in MakeContextCurrent() use old display pointer for __glXSetupForCommand(), bug 8443
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 4 Oct 2006 16:22:24 +0000 (16:22 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 4 Oct 2006 16:22:24 +0000 (16:22 +0000)
src/glx/x11/glxext.c

index d4edf6d85d9366212d558c83714a594229497eba..ab2795efbe543054702653391c998d3e60e1ea7f 100644 (file)
@@ -1582,7 +1582,7 @@ USED static Bool MakeContextCurrent(Display *dpy, GLXDrawable draw,
     }
 
     oldGC = __glXGetCurrentContext();
-    oldOpcode = (gc == oldGC) ? opcode : __glXSetupForCommand(dpy);
+    oldOpcode = (gc == oldGC) ? opcode : __glXSetupForCommand(oldGC->currentDpy);
     if (!oldOpcode) {
        return GL_FALSE;
     }