From 95128c1d4c88238a79ead6e36215a646f83bbdd3 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Nov 2007 07:58:53 -0700 Subject: [PATCH] check for fence==NULL in intel_batchbuffer_finish(), fixes glxinfo crash on exit --- .../drivers/dri/intel_winsys/intel_batchbuffer.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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); + } } -- 2.30.2