[Mesa-dev] [PATCH] glx/dri3: a drawable might not be bound at wait time

Michel Dänzer michel at daenzer.net
Sun Dec 20 23:10:07 PST 2015


On 20.12.2015 05:31, Ilia Mirkin wrote:
> A trace of Alien Isolation hit this on nouveau.
> 
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> Cc: "11.0 11.1" <mesa-stable at lists.freedesktop.org>
> ---
> 
> Disclaimer: I have no idea if this is a legal situation, but other calls to
> GetGLXDRIDrawable are null-checked.
> 
>  src/glx/dri3_glx.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c
> index ee24312..8bdbb9c 100644
> --- a/src/glx/dri3_glx.c
> +++ b/src/glx/dri3_glx.c
> @@ -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);
>  }
>  
>  /**
> 

Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer at amd.com>


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the mesa-dev mailing list