From c89eba0f31623084bc754de724384c80a3e57c91 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Wed, 8 Apr 2009 21:11:51 +0100 Subject: python: Don't try to finish a null fence. --- src/gallium/state_trackers/python/p_context.i | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/gallium/state_trackers/python/p_context.i b/src/gallium/state_trackers/python/p_context.i index 9a3003a56c4..a40aa1e5187 100644 --- a/src/gallium/state_trackers/python/p_context.i +++ b/src/gallium/state_trackers/python/p_context.i @@ -258,9 +258,11 @@ error1: flush(unsigned flags = 0) { struct pipe_fence_handle *fence = NULL; $self->pipe->flush($self->pipe, flags | PIPE_FLUSH_RENDER_CACHE, &fence); - /* TODO: allow asynchronous operation */ - $self->pipe->screen->fence_finish( $self->pipe->screen, fence, 0 ); - $self->pipe->screen->fence_reference( $self->pipe->screen, &fence, NULL ); + if(fence) { + /* TODO: allow asynchronous operation */ + $self->pipe->screen->fence_finish( $self->pipe->screen, fence, 0 ); + $self->pipe->screen->fence_reference( $self->pipe->screen, &fence, NULL ); + } } /* -- cgit v1.2.3