diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-02-02 18:01:06 +0100 |
---|---|---|
committer | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-02-06 17:39:10 +0100 |
commit | 21ec35566be2c1aca07083a67f462618ae15fa86 (patch) | |
tree | 186e6d059c11c161ddb9a9ee699457ef9cf32259 /src/glx/dri3_glx.c | |
parent | 40c304fc065259c07c0f4f7a35efedd205e4f250 (diff) |
glx/dri3: guard in_current_context against a disappeared drawable
Cc: 17.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'src/glx/dri3_glx.c')
-rw-r--r-- | src/glx/dri3_glx.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c index f7bcba32f3..2d40f0ad45 100644 --- a/src/glx/dri3_glx.c +++ b/src/glx/dri3_glx.c @@ -119,6 +119,10 @@ static bool glx_dri3_in_current_context(struct loader_dri3_drawable *draw) { struct dri3_drawable *priv = loader_drawable_to_dri3_drawable(draw); + + if (!priv) + return false; + struct dri3_context *pcp = (struct dri3_context *) __glXGetCurrentContext(); struct dri3_screen *psc = (struct dri3_screen *) priv->base.psc; |