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 <jfonseca@vmware.com>
This commit is contained in:
Brian Paul 2013-05-20 16:13:53 -06:00
parent 8cabc7be1d
commit 1e9875acbe

View file

@ -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;
}