From: Juha-Pekka Heikkila Date: Mon, 2 Dec 2013 14:30:00 +0000 (-0700) Subject: glx: Add missing null check in gxl/dri2_glx.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=03ef57950a8c8e69043a87511693ba8bdf4a73be;p=mesa.git glx: Add missing null check in gxl/dri2_glx.c Signed-off-by: Juha-Pekka Heikkila Reviewed-by: Brian Paul --- diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c index 3b333120cba..bfeebed9dd6 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();