summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2010-10-14 17:13:36 +0800
committerChia-I Wu <[email protected]>2010-10-14 17:16:14 +0800
commitd6de1f44a0cdcc739d3b319b5f102e1733e5b4e3 (patch)
treed62d48ea8163dab0acbf650897be7b5edea9ff0b /src/gallium/state_trackers
parentc97c77d8698ddab1c8a2900fe7c82e1d111ccb8a (diff)
st/egl: Do not finish a fence that is NULL.
i915g would dereference the NULL pointer.
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/egl/common/egl_g3d_api.c6
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 c0164daf9c1..3bde39737ba 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;
}