Mesa (7.9): st/egl: Do not finish a fence that is NULL.
Chia-I Wu
olv at kemper.freedesktop.org
Fri Oct 15 03:21:49 UTC 2010
Module: Mesa
Branch: 7.9
Commit: da580c734f94191f63259c0d57386e5d9448c9bf
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=da580c734f94191f63259c0d57386e5d9448c9bf
Author: Chia-I Wu <olv at lunarg.com>
Date: Thu Oct 14 17:13:36 2010 +0800
st/egl: Do not finish a fence that is NULL.
i915g would dereference the NULL pointer.
(cherry picked from commit d6de1f44a0cdcc739d3b319b5f102e1733e5b4e3)
---
.../state_trackers/egl/common/egl_g3d_api.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_api.c b/src/gallium/state_trackers/egl/common/egl_g3d_api.c
index c0164da..3bde397 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d_api.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d_api.c
@@ -609,8 +609,10 @@ egl_g3d_wait_client(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx)
gctx->stctxi->flush(gctx->stctxi,
PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, &fence);
- screen->fence_finish(screen, fence, 0);
- screen->fence_reference(screen, &fence, NULL);
+ if (fence) {
+ screen->fence_finish(screen, fence, 0);
+ screen->fence_reference(screen, &fence, NULL);
+ }
return EGL_TRUE;
}
More information about the mesa-commit
mailing list