glx: Unconditionally clear lastGLContext on loseCurrent().
This hook calls unbindContext in the DRI driver interface, which unsets the dispatch table, regardless of whether the context argument was the current one or not. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
789509ef53
commit
008f1ab31e
|
@ -135,7 +135,6 @@ DrawableGone(__GLXdrawable * glxPriv, XID xid)
|
||||||
(c->drawPriv == glxPriv || c->readPriv == glxPriv)) {
|
(c->drawPriv == glxPriv || c->readPriv == glxPriv)) {
|
||||||
/* just force a re-bind the next time through */
|
/* just force a re-bind the next time through */
|
||||||
(*c->loseCurrent) (c);
|
(*c->loseCurrent) (c);
|
||||||
if (c == lastGLContext)
|
|
||||||
lastGLContext = NULL;
|
lastGLContext = NULL;
|
||||||
}
|
}
|
||||||
if (c->drawPriv == glxPriv)
|
if (c->drawPriv == glxPriv)
|
||||||
|
@ -290,6 +289,7 @@ glxClientCallback(CallbackListPtr *list, void *closure, void *data)
|
||||||
next = c->next;
|
next = c->next;
|
||||||
if (c->currentClient == pClient) {
|
if (c->currentClient == pClient) {
|
||||||
c->loseCurrent(c);
|
c->loseCurrent(c);
|
||||||
|
lastGLContext = NULL;
|
||||||
c->currentClient = NULL;
|
c->currentClient = NULL;
|
||||||
__glXFreeContext(c);
|
__glXFreeContext(c);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user