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.
This commit is contained in:
Brian
2007-08-11 17:03:51 +01:00
parent 83521ee66a
commit 37fdc69a99
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -124,7 +124,7 @@ i915_region_release(struct pipe_context *pipe, struct pipe_region **region)
assert((*region)->map_refcount == 0);
i915->pipe.winsys->buffer_unreference( i915->pipe.winsys,
(*region)->buffer );
&((*region)->buffer) );
free(*region);
}
*region = NULL;
+1 -1
View File
@@ -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;