summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_cb_flush.c
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2008-11-24 13:44:30 +0900
committerJosé Fonseca <[email protected]>2008-11-24 13:44:30 +0900
commit52e9c9770ac47e9d92df208ec5cfd4e004c45f3d (patch)
treebf8636d78a47de25b8ee8728492ab17083976e9f /src/mesa/state_tracker/st_cb_flush.c
parent79bfe372f2bfa633c457e82a3e37f3eb42af4b5b (diff)
mesa: Don't call fence_finish with a null fence.
Diffstat (limited to 'src/mesa/state_tracker/st_cb_flush.c')
-rw-r--r--src/mesa/state_tracker/st_cb_flush.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_cb_flush.c b/src/mesa/state_tracker/st_cb_flush.c
index d8f9537d2de..cc404679416 100644
--- a/src/mesa/state_tracker/st_cb_flush.c
+++ b/src/mesa/state_tracker/st_cb_flush.c
@@ -93,8 +93,10 @@ void st_finish( struct st_context *st )
st_flush(st, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, &fence);
- st->pipe->winsys->fence_finish(st->pipe->winsys, fence, 0);
- st->pipe->winsys->fence_reference(st->pipe->winsys, &fence, NULL);
+ if(fence) {
+ st->pipe->winsys->fence_finish(st->pipe->winsys, fence, 0);
+ st->pipe->winsys->fence_reference(st->pipe->winsys, &fence, NULL);
+ }
}