From: José Fonseca Date: Wed, 8 Apr 2009 20:11:51 +0000 (+0100) Subject: python: Don't try to finish a null fence. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c89eba0f31623084bc754de724384c80a3e57c91;p=mesa.git python: Don't try to finish a null fence. --- 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 ); + } } /*