diff options
author | Brian <[email protected]> | 2007-11-08 07:58:53 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2007-11-08 08:48:14 -0700 |
commit | 95128c1d4c88238a79ead6e36215a646f83bbdd3 (patch) | |
tree | 5821648937e708ee707a182f74d1654a8757a7a7 /src/mesa | |
parent | 3871d2882a5e3ae8aafe3206603e095cc90761b5 (diff) |
check for fence==NULL in intel_batchbuffer_finish(), fixes glxinfo crash on exit
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.c | 12 |
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); + } } |