diff options
author | José Fonseca <[email protected]> | 2009-04-08 21:11:51 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2009-04-08 21:41:04 +0100 |
commit | c89eba0f31623084bc754de724384c80a3e57c91 (patch) | |
tree | 844c788f683331ec5cd04a0eea91c7a29191fdf2 /src/gallium/state_trackers/python | |
parent | 4342d6a91f754c9d3e7087ed91b7acf89abbb293 (diff) |
python: Don't try to finish a null fence.
Diffstat (limited to 'src/gallium/state_trackers/python')
-rw-r--r-- | src/gallium/state_trackers/python/p_context.i | 8 |
1 files changed, 5 insertions, 3 deletions
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 ); + } } /* |