summaryrefslogtreecommitdiff
path: root/glx
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2014-04-17 18:28:54 -0700
committerEric Anholt <eric@anholt.net>2014-04-23 10:32:10 -0700
commit008f1ab31e8ac6be8f3fb11f19cdf8674be318dd (patch)
tree60755e88ba1c99c53d66bc086a4a959a9556a80c /glx
parent789509ef5324ce9141222fa92dea51b5cc777209 (diff)
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>
Diffstat (limited to 'glx')
-rw-r--r--glx/glxext.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/glx/glxext.c b/glx/glxext.c
index 98557670a..c0142fe2e 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -135,8 +135,7 @@ DrawableGone(__GLXdrawable * glxPriv, XID xid)
(c->drawPriv == glxPriv || c->readPriv == glxPriv)) {
/* just force a re-bind the next time through */
(*c->loseCurrent) (c);
- if (c == lastGLContext)
- lastGLContext = NULL;
+ lastGLContext = NULL;
}
if (c->drawPriv == glxPriv)
c->drawPriv = NULL;
@@ -290,6 +289,7 @@ glxClientCallback(CallbackListPtr *list, void *closure, void *data)
next = c->next;
if (c->currentClient == pClient) {
c->loseCurrent(c);
+ lastGLContext = NULL;
c->currentClient = NULL;
__glXFreeContext(c);
}