aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-09-30 15:43:57 +0000
committermarha <marha@users.sourceforge.net>2010-09-30 15:43:57 +0000
commit54fffe7283b49dcaae81e826eb0dff213552c4ec (patch)
treec3a8c65ebffb5841251bd16edec93f0576f77418 /xorg-server/glx
parentd718b0dd8ed27c6f8497077b8d4b088d9b7f7bd3 (diff)
parentf952d0d771de6d9b8ecc3cbbe3624203723bbb25 (diff)
downloadvcxsrv-54fffe7283b49dcaae81e826eb0dff213552c4ec.tar.gz
vcxsrv-54fffe7283b49dcaae81e826eb0dff213552c4ec.tar.bz2
vcxsrv-54fffe7283b49dcaae81e826eb0dff213552c4ec.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/glx')
-rw-r--r--xorg-server/glx/glxext.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/xorg-server/glx/glxext.c b/xorg-server/glx/glxext.c
index e48a90da6..b5be7780c 100644
--- a/xorg-server/glx/glxext.c
+++ b/xorg-server/glx/glxext.c
@@ -128,8 +128,7 @@ static int glxBlockClients;
*/
static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
{
- __GLXcontext *c;
- __GLXcontext *cnext;
+ __GLXcontext *c, *next;
/* If this drawable was created using glx 1.3 drawable
* constructors, we added it as a glx drawable resource under both
@@ -142,8 +141,8 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
FreeResourceByType(glxPriv->drawId, __glXDrawableRes, TRUE);
}
- for (c = glxAllContexts; c; c = cnext) {
- cnext=c->next; /* Save because c is going to be freed */
+ for (c = glxAllContexts; c; c = next) {
+ next = c->next;
if (c->isCurrent && (c->drawPriv == glxPriv || c->readPriv == glxPriv)) {
int i;
@@ -166,15 +165,13 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
}
}
}
-
- if (!c->idExists) {
- __glXFreeContext(c);
- }
}
if (c->drawPriv == glxPriv)
c->drawPriv = NULL;
if (c->readPriv == glxPriv)
c->readPriv = NULL;
+ if (!c->idExists && !c->isCurrent)
+ __glXFreeContext(c);
}
glxPriv->destroy(glxPriv);