From: Brian Paul Date: Mon, 20 May 2013 22:15:24 +0000 (-0600) Subject: xlib: check for null ctx pointer in glXIsDirect() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9772284df2cba1dd30ec401fd19c5a212197b411;p=mesa.git xlib: check for null ctx pointer in glXIsDirect() Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64745 Note: This is a candidate for the stable branches. Reviewed-by: Jose Fonseca --- diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c index daed4f4de4e..c7fb327db71 100644 --- a/src/mesa/drivers/x11/fakeglx.c +++ b/src/mesa/drivers/x11/fakeglx.c @@ -1551,7 +1551,7 @@ Fake_glXIsDirect( Display *dpy, GLXContext ctx ) { struct fake_glx_context *glxCtx = (struct fake_glx_context *) ctx; (void) dpy; - return glxCtx->xmesaContext->direct; + return glxCtx ? glxCtx->xmesaContext->direct : False; }