summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-04-08 21:11:51 +0100
committerJosé Fonseca <jfonseca@vmware.com>2009-04-08 21:41:04 +0100
commitc89eba0f31623084bc754de724384c80a3e57c91 (patch)
tree844c788f683331ec5cd04a0eea91c7a29191fdf2 /src/gallium
parent4342d6a91f754c9d3e7087ed91b7acf89abbb293 (diff)
python: Don't try to finish a null fence.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/python/p_context.i8
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 9a3003a56c..a40aa1e518 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 );
+ }
}
/*