summaryrefslogtreecommitdiffstats
path: root/src/glx/x11
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-06-17 07:58:35 -0600
committerBrian Paul <[email protected]>2009-06-17 08:03:19 -0600
commitc53705ed7b89e5a2586b534508182de9c72452ea (patch)
treee441f38c3aed6f1bc6c8f8fd3360a9e2191eb3d1 /src/glx/x11
parentebe0796ba2d314202c30a1c9291a7e725c64b16a (diff)
GLX: attempt to fix glean makeCurrent test cases.
Two parts to this: One we don't keep pointers to possibly freed memory anymore once we unbind the drawables from the context. Brian I need to figure out what the comment you made there, can we get a glean/piglit test so we can fix it properly? If the new gc is the same as the oldGC, we call the unbind even though we just bound it in that function. doh. (cherry picked from master, commit 77506dac8e81e9548a7e9680ce367175fe5747af)
Diffstat (limited to 'src/glx/x11')
-rw-r--r--src/glx/x11/glxcurrent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glx/x11/glxcurrent.c b/src/glx/x11/glxcurrent.c
index 01f42332413..d44e0dd1fc8 100644
--- a/src/glx/x11/glxcurrent.c
+++ b/src/glx/x11/glxcurrent.c
@@ -457,7 +457,7 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
&dummy_reply);
}
#ifdef GLX_DIRECT_RENDERING
- else if (oldGC->driContext) {
+ else if (oldGC->driContext && oldGC != gc) {
oldGC->driContext->unbindContext(oldGC->driContext);
}
#endif