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);
}
__glXFlushContextCache();
if (!glxc->isDirect) {
__glXUnrefDrawable(glxc->drawPriv);
__glXUnrefDrawable(glxc->readPriv);
if (!prevglxc->isDirect) {
__glXUnrefDrawable(prevglxc->drawPriv);
__glXUnrefDrawable(prevglxc->readPriv);
}
}