diff options
author | Nicolai Hähnle <[email protected]> | 2017-02-02 18:01:06 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-02-10 11:06:58 +0000 |
commit | 48d5cf36a1cfd548e6a98d96828273f035066b5b (patch) | |
tree | 007dc7d948161e46c9bd584fd54726d85465c3d3 /src | |
parent | b3bc9b4b526157356931d76ecb1b389316514212 (diff) |
glx/dri3: guard in_current_context against a disappeared drawable
Cc: 17.0 <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
(cherry picked from commit 21ec35566be2c1aca07083a67f462618ae15fa86)
Diffstat (limited to 'src')
-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 f7bcba32f3e..2d40f0ad458 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; |