From: Brian Paul Date: Mon, 20 May 2013 22:13:53 +0000 (-0600) Subject: st/glx/xlib: check for null ctx pointer in glXIsDirect() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1e9875acbe0a1204e144b12b66b5b0ec55664e2c;p=mesa.git st/glx/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/gallium/state_trackers/glx/xlib/glx_api.c b/src/gallium/state_trackers/glx/xlib/glx_api.c index 88f58863fff..a66ebc8e8a4 100644 --- a/src/gallium/state_trackers/glx/xlib/glx_api.c +++ b/src/gallium/state_trackers/glx/xlib/glx_api.c @@ -1369,9 +1369,7 @@ glXDestroyContext( Display *dpy, GLXContext ctx ) PUBLIC Bool glXIsDirect( Display *dpy, GLXContext ctx ) { - GLXContext glxCtx = ctx; - (void) ctx; - return glxCtx->isDirect; + return ctx ? ctx->isDirect : False; }