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.
assert((*region)->map_refcount == 0);
i915->pipe.winsys->buffer_unreference( i915->pipe.winsys,
- (*region)->buffer );
+ &((*region)->buffer) );
free(*region);
}
*region = NULL;
assert((*region)->map_refcount == 0);
sp->pipe.winsys->buffer_unreference( sp->pipe.winsys,
- (*region)->buffer );
+ &((*region)->buffer) );
free(*region);
}
*region = NULL;