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 <brianp@vmware.com>
(cherry picked from commit 496a691e35)
This commit is contained in:
Frank Richter 2017-06-07 14:40:23 +02:00 committed by Emil Velikov
parent bdab7c69f5
commit c7c6ba44ca

View file

@ -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);