xlib: add null ctx check in glXDestroyContext()

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64934
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-24 08:06:19 -06:00
parent fd29e4acda
commit fd9fe4470b

View File

@@ -1533,6 +1533,7 @@ void _kw_ungrab_all( Display *dpy )
static void
Fake_glXDestroyContext( Display *dpy, GLXContext ctx )
{
if (ctx) {
struct fake_glx_context *glxCtx = (struct fake_glx_context *) ctx;
(void) dpy;
MakeCurrent_PrevContext = 0;
@@ -1544,6 +1545,7 @@ Fake_glXDestroyContext( Display *dpy, GLXContext ctx )
XMesaGarbageCollect(dpy);
free(glxCtx);
}
}
static Bool