Module: Mesa
Branch: master
Commit: 496a691e3544d082670ac1f33059692510a2a86d
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=496a691e3544d082670ac1f33059692510a2a86d

Author: Frank Richter <[email protected]>
Date:   Wed Jun  7 14:40:23 2017 +0200

st/mesa: fix a null pointer access

Fixes crash with llvmpipe on Windows.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102148
Cc: [email protected]
Reviewed-by: Brian Paul <[email protected]>

---

 src/mesa/state_tracker/st_manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/state_tracker/st_manager.c 
b/src/mesa/state_tracker/st_manager.c
index 617a691a67..07c430dca4 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);

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to