From: Eric Anholt Date: Fri, 18 Apr 2014 01:28:54 +0000 (-0700) Subject: glx: Unconditionally clear lastGLContext on loseCurrent(). X-Git-Tag: upstream/1.16~86 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=008f1ab31e8ac6be8f3fb11f19cdf8674be318dd;p=platform%2Fupstream%2Fxorg-server.git 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 Reviewed-by: Michel Dänzer Reviewed-by: Adam Jackson --- diff --git a/glx/glxext.c b/glx/glxext.c index 9855767..c0142fe 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); }