aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx/glxext.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-04-19 07:24:51 +0000
committermarha <marha@users.sourceforge.net>2010-04-19 07:24:51 +0000
commitd76a22b9314bfd407c7e26f78305aeecb5d2bcfb (patch)
tree12159810407a7473bed2b7ebf2dd33a86aabf854 /xorg-server/glx/glxext.c
parentc9431e290c4f5bc0dcd290880df404fb50a5aa5e (diff)
downloadvcxsrv-d76a22b9314bfd407c7e26f78305aeecb5d2bcfb.tar.gz
vcxsrv-d76a22b9314bfd407c7e26f78305aeecb5d2bcfb.tar.bz2
vcxsrv-d76a22b9314bfd407c7e26f78305aeecb5d2bcfb.zip
xserver git update 19/4/2010
Diffstat (limited to 'xorg-server/glx/glxext.c')
-rw-r--r--xorg-server/glx/glxext.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/xorg-server/glx/glxext.c b/xorg-server/glx/glxext.c
index 59bcfbed2..89e58b0b0 100644
--- a/xorg-server/glx/glxext.c
+++ b/xorg-server/glx/glxext.c
@@ -126,6 +126,17 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
{
__GLXcontext *c;
+ /* 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 = c->next) {
if (c->isCurrent && (c->drawPriv == glxPriv || c->readPriv == glxPriv)) {
int i;