summaryrefslogtreecommitdiffstats
path: root/src/glx/dri3_glx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/dri3_glx.c')
-rw-r--r--src/glx/dri3_glx.c4
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;