diff --git a/src/glx/x11/glxcurrent.c b/src/glx/x11/glxcurrent.c index 5434d33..cf1a0b2 100644 --- a/src/glx/x11/glxcurrent.c +++ b/src/glx/x11/glxcurrent.c @@ -412,7 +412,8 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw, #ifdef GLX_DIRECT_RENDERING if ((dpy != oldGC->currentDpy || (gc && gc->driContext)) && - !oldGC->isDirect && oldGC != &dummyContext) { + !oldGC->isDirect && oldGC != &dummyContext && + oldGC->xid != None) { #else if ((dpy != oldGC->currentDpy) && oldGC != &dummyContext) { #endif