i915g: don't try to check if a NULL buffer is busy.
authorStéphane Marchesin <marcheu@chromium.org>
Wed, 13 Jul 2011 18:59:10 +0000 (11:59 -0700)
committerStéphane Marchesin <marcheu@chromium.org>
Wed, 13 Jul 2011 18:59:10 +0000 (11:59 -0700)
src/gallium/winsys/i915/drm/i915_drm_buffer.c

index 89d8e89e6a750be85c3675f0dd30875ad40ebee0..ac66af333dfd84000171d16bdd3fc5d6851ac131 100644 (file)
@@ -218,6 +218,8 @@ i915_drm_buffer_is_busy(struct i915_winsys *iws,
                         struct i915_winsys_buffer *buffer)
 {
    struct i915_drm_buffer* i915_buffer = i915_drm_buffer(buffer);
+   if (!i915_buffer)
+      return FALSE;
    return drm_intel_bo_busy(i915_buffer->bo);
 }