From 9ad5f3e30afc71c4007545eabfa962d0a9a54882 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Fri, 24 Sep 2010 16:57:19 +0100 Subject: glx: In DrawableGone, only clear context tags when we are also deleting the context In DrawableGone, don't clear tags for context which has idExists set The client hasn't deleted them yet and may still refer to the tag https://bugs.freedesktop.org/show_bug.cgi?id=30089 Signed-off-by: Jon TURNEY --- glx/glxext.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/glx/glxext.c b/glx/glxext.c index 4078e896b..3bac156f6 100644 --- a/glx/glxext.c +++ b/glx/glxext.c @@ -148,7 +148,8 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid) if (c == __glXLastContext) __glXFlushContextCache(); - for (i = 1; i < currentMaxClients; i++) { + if (!c->idExists) { + for (i = 1; i < currentMaxClients; i++) { if (clients[i]) { __GLXclientState *cl = glxGetClient(clients[i]); @@ -161,10 +162,8 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid) } } } - } - - if (!c->idExists) { - __glXFreeContext(c); + } + __glXFreeContext(c); } } if (c->drawPriv == glxPriv) -- cgit v1.2.3