From 77506dac8e81e9548a7e9680ce367175fe5747af Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 11 Jun 2009 10:50:32 +1000 Subject: 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. --- src/glx/x11/glxcurrent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/glx/x11') diff --git a/src/glx/x11/glxcurrent.c b/src/glx/x11/glxcurrent.c index 01f4233241..d44e0dd1fc 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 -- cgit v1.2.3