summaryrefslogtreecommitdiff
path: root/glx/glxcmds.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2008-07-28 09:33:04 +0200
committerMichel Dänzer <michel@tungstengraphics.com>2008-07-28 09:33:04 +0200
commitec10eccd56be8b947cd63cae0687b8319857fe60 (patch)
tree1f8451cad275cad494d7196f53fa7b52887fd579 /glx/glxcmds.c
parent6ab8d6010adfd5ad6f1e1094a26c84f0aff934b1 (diff)
GLX: Unreference drawables bound to the old context, not the new one.
Apart from the obvious reference counting issue, this fixes http://bugs.freedesktop.org/show_bug.cgi?id=16867 .
Diffstat (limited to 'glx/glxcmds.c')
-rw-r--r--glx/glxcmds.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index f4fc03159..19d8674a1 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -620,9 +620,9 @@ DoMakeCurrent(__GLXclientState *cl,
return __glXError(GLXBadContext);
}
__glXFlushContextCache();
- if (!glxc->isDirect) {
- __glXUnrefDrawable(glxc->drawPriv);
- __glXUnrefDrawable(glxc->readPriv);
+ if (!prevglxc->isDirect) {
+ __glXUnrefDrawable(prevglxc->drawPriv);
+ __glXUnrefDrawable(prevglxc->readPriv);
}
}