From ec10eccd56be8b947cd63cae0687b8319857fe60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Mon, 28 Jul 2008 09:33:04 +0200 Subject: [PATCH] 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 . --- glx/glxcmds.c | 6 +++--- 1 file 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); } }