summaryrefslogtreecommitdiff
path: root/src/glx/dri2_glx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/dri2_glx.c')
-rw-r--r--src/glx/dri2_glx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 3b333120cb..bfeebed9dd 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -676,6 +676,10 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void *loaderPrivate)
psc = (struct dri2_screen *) pdraw->base.psc;
priv = __glXInitialize(psc->base.dpy);
+
+ if (priv == NULL)
+ return;
+
pdp = (struct dri2_display *) priv->dri2Display;
gc = __glXGetCurrentContext();