aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx/glxext.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-04-19 12:16:20 +0000
committermarha <marha@users.sourceforge.net>2010-04-19 12:16:20 +0000
commit0b53765917ae196147886189ca3514a07e0eb45e (patch)
tree0188ad84af0b6949528ff8c53c2d16f24a9f1eea /xorg-server/glx/glxext.c
parent0b8629ada4293370d220bbb7e6c195c711baee7d (diff)
downloadvcxsrv-0b53765917ae196147886189ca3514a07e0eb45e.tar.gz
vcxsrv-0b53765917ae196147886189ca3514a07e0eb45e.tar.bz2
vcxsrv-0b53765917ae196147886189ca3514a07e0eb45e.zip
svn merge -r537:HEAD "^/branches/released" .
Diffstat (limited to 'xorg-server/glx/glxext.c')
-rw-r--r--xorg-server/glx/glxext.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/xorg-server/glx/glxext.c b/xorg-server/glx/glxext.c
index c1fedf3b9..53838077a 100644
--- a/xorg-server/glx/glxext.c
+++ b/xorg-server/glx/glxext.c
@@ -131,8 +131,19 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
__GLXcontext *c;
__GLXcontext *cnext;
+ /* If this drawable was created using glx 1.3 drawable
+ * constructors, we added it as a glx drawable resource under both
+ * its glx drawable ID and it X drawable ID. Remove the other
+ * resource now so we don't a callback for freed memory. */
+ if (glxPriv->drawId != glxPriv->pDraw->id) {
+ if (xid == glxPriv->drawId)
+ FreeResourceByType(glxPriv->pDraw->id, __glXDrawableRes, TRUE);
+ else
+ FreeResourceByType(glxPriv->drawId, __glXDrawableRes, TRUE);
+ }
+
for (c = glxAllContexts; c; c = cnext) {
- cnext=c->next; /* Safe because c is going to be freed */
+ cnext=c->next; /* Save because c is going to be freed */
if (c->isCurrent && (c->drawPriv == glxPriv || c->readPriv == glxPriv)) {
int i;