glx/dri3: a drawable might not be bound at wait time
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 19 Dec 2015 20:29:14 +0000 (15:29 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Mon, 21 Dec 2015 11:43:58 +0000 (06:43 -0500)
A trace of Alien Isolation hit this on nouveau.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
src/glx/dri3_glx.c

index ee2431267319ed05a38febc4b62a4b73dfe3e977..8bdbb9caf560d4649b8416d595bc380d3dcda8c9 100644 (file)
@@ -437,7 +437,8 @@ dri3_wait_x(struct glx_context *gc)
    struct dri3_drawable *priv = (struct dri3_drawable *)
       GetGLXDRIDrawable(gc->currentDpy, gc->currentDrawable);
 
-   loader_dri3_wait_x(&priv->loader_drawable);
+   if (priv)
+      loader_dri3_wait_x(&priv->loader_drawable);
 }
 
 static void
@@ -446,7 +447,8 @@ dri3_wait_gl(struct glx_context *gc)
    struct dri3_drawable *priv = (struct dri3_drawable *)
       GetGLXDRIDrawable(gc->currentDpy, gc->currentDrawable);
 
-   loader_dri3_wait_gl(&priv->loader_drawable);
+   if (priv)
+      loader_dri3_wait_gl(&priv->loader_drawable);
 }
 
 /**