Browse Source

ws/i965: allow NULL buffer in winsys::bo_unreference

Special case to avoid clutter in the driver
tags/7.8-rc1
Keith Whitwell 16 years ago
parent
commit
18efe9a687
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      src/gallium/winsys/drm/i965/xlib/xlib_i965.c

+ 6
- 0
src/gallium/winsys/drm/i965/xlib/xlib_i965.c View File

@@ -154,6 +154,12 @@ xlib_brw_bo_unreference( struct brw_winsys_buffer *buffer )
{
struct xlib_brw_buffer *buf = xlib_brw_buffer(buffer);

/* As a special favor in this call only, buffer is allowed to be
* NULL:
*/
if (buffer == NULL)
return;

if (--buf->cheesy_refcount == 0) {
FREE(buffer);
}

Loading…
Cancel
Save