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 .
This commit is contained in:
Michel Dänzer 2008-07-28 09:33:04 +02:00
parent 6ab8d6010a
commit ec10eccd56

View File

@ -620,9 +620,9 @@ DoMakeCurrent(__GLXclientState *cl,
return __glXError(GLXBadContext); return __glXError(GLXBadContext);
} }
__glXFlushContextCache(); __glXFlushContextCache();
if (!glxc->isDirect) { if (!prevglxc->isDirect) {
__glXUnrefDrawable(glxc->drawPriv); __glXUnrefDrawable(prevglxc->drawPriv);
__glXUnrefDrawable(glxc->readPriv); __glXUnrefDrawable(prevglxc->readPriv);
} }
} }