From 1e9875acbe0a1204e144b12b66b5b0ec55664e2c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 20 May 2013 16:13:53 -0600 Subject: [PATCH] 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 --- src/gallium/state_trackers/glx/xlib/glx_api.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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; } -- 2.30.2