From: Frank Richter Date: Wed, 7 Jun 2017 12:40:23 +0000 (+0200) Subject: st/mesa: fix a null pointer access X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=496a691e3544d082670ac1f33059692510a2a86d;p=mesa.git st/mesa: fix a null pointer access Fixes crash with llvmpipe on Windows. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102148 Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Brian Paul --- diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index 617a691a67c..07c430dca45 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -634,7 +634,7 @@ st_context_flush(struct st_context_iface *stctxi, unsigned flags, st_flush(st, fence, pipe_flags); - if ((flags & ST_FLUSH_WAIT) && fence) { + if ((flags & ST_FLUSH_WAIT) && fence && *fence) { st->pipe->screen->fence_finish(st->pipe->screen, NULL, *fence, PIPE_TIMEOUT_INFINITE); st->pipe->screen->fence_reference(st->pipe->screen, fence, NULL);