From: Brian Date: Thu, 8 Nov 2007 14:58:53 +0000 (-0700) Subject: check for fence==NULL in intel_batchbuffer_finish(), fixes glxinfo crash on exit X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=95128c1d4c88238a79ead6e36215a646f83bbdd3;p=mesa.git check for fence==NULL in intel_batchbuffer_finish(), fixes glxinfo crash on exit --- diff --git a/src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.c b/src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.c index 784ed2210ac..49e04d81ec1 100644 --- a/src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.c +++ b/src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.c @@ -311,11 +311,13 @@ void intel_batchbuffer_finish(struct intel_batchbuffer *batch) { struct _DriFenceObject *fence = intel_batchbuffer_flush(batch); - driFenceReference(fence); - driFenceFinish(fence, - DRM_FENCE_TYPE_EXE | DRM_I915_FENCE_TYPE_RW, - GL_FALSE); - driFenceUnReference(fence); + if (fence) { + driFenceReference(fence); + driFenceFinish(fence, + DRM_FENCE_TYPE_EXE | DRM_I915_FENCE_TYPE_RW, + GL_FALSE); + driFenceUnReference(fence); + } }