glx: Add missing null check in gxl/dri2_glx.c
authorJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Mon, 2 Dec 2013 14:30:00 +0000 (07:30 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 3 Dec 2013 21:35:41 +0000 (14:35 -0700)
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/glx/dri2_glx.c

index 3b333120cba485b33a3ae2b3ccbd1e37bd324108..bfeebed9dd6b4bf8f22f69ad538f0923ca384c18 100644 (file)
@@ -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();