summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-11-08 07:58:53 -0700
committerBrian <[email protected]>2007-11-08 08:48:14 -0700
commit95128c1d4c88238a79ead6e36215a646f83bbdd3 (patch)
tree5821648937e708ee707a182f74d1654a8757a7a7 /src
parent3871d2882a5e3ae8aafe3206603e095cc90761b5 (diff)
check for fence==NULL in intel_batchbuffer_finish(), fixes glxinfo crash on exit
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.c12
1 files 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);
+ }
}