From 37fdc69a99a7692d337fb4efaea97df842490f21 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 11 Aug 2007 17:03:51 +0100 Subject: fix invalid usage of buffer_unreference() Need to pass the address of the buffer ptr, not the buffer ptr. Before, the region->buffer type was void * so it wasn't effectively type-checked. Changing the type to pipe_buffer_object* allows the compiler to detect the error. Fixing this solves a segfault. --- src/mesa/pipe/softpipe/sp_region.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/pipe/softpipe/sp_region.c') diff --git a/src/mesa/pipe/softpipe/sp_region.c b/src/mesa/pipe/softpipe/sp_region.c index 115f3ab826..10b7479e97 100644 --- a/src/mesa/pipe/softpipe/sp_region.c +++ b/src/mesa/pipe/softpipe/sp_region.c @@ -119,7 +119,7 @@ sp_region_release(struct pipe_context *pipe, struct pipe_region **region) assert((*region)->map_refcount == 0); sp->pipe.winsys->buffer_unreference( sp->pipe.winsys, - (*region)->buffer ); + &((*region)->buffer) ); free(*region); } *region = NULL; -- cgit v1.2.3