diff options
author | Kristian Høgsberg <[email protected]> | 2010-09-29 08:32:12 -0400 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2010-09-29 08:32:29 -0400 |
commit | 4b70fe8421f5132c585ff1dfb8d90229be26e71f (patch) | |
tree | 9bc86ac5a4ea686f9ea6cd874b998f93bd1052f9 /src | |
parent | 08839c4055e89a10e90df2f3a3a2bdc4e6ce0273 (diff) |
glx: Only remove drawables from the hash when we actually delete them
https://bugs.freedesktop.org/show_bug.cgi?id=30457
Diffstat (limited to 'src')
-rw-r--r-- | src/glx/dri_common.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c index 5fb5255416b..83d6e3c3108 100644 --- a/src/glx/dri_common.c +++ b/src/glx/dri_common.c @@ -391,17 +391,19 @@ driReleaseDrawables(struct glx_context *gc) if (__glxHashLookup(priv->drawHash, gc->currentDrawable, (void *) &pdraw) == 0) { - if (pdraw->drawable == pdraw->xDrawable) + if (pdraw->drawable == pdraw->xDrawable) { (*pdraw->destroyDrawable)(pdraw); - __glxHashDelete(priv->drawHash, gc->currentDrawable); + __glxHashDelete(priv->drawHash, gc->currentDrawable); + } } if (gc->currentDrawable != gc->currentReadable && __glxHashLookup(priv->drawHash, gc->currentReadable, (void *) &pdraw) == 0) { - if (pdraw->drawable == pdraw->xDrawable) + if (pdraw->drawable == pdraw->xDrawable) { (*pdraw->destroyDrawable)(pdraw); - __glxHashDelete(priv->drawHash, gc->currentReadable); + __glxHashDelete(priv->drawHash, gc->currentReadable); + } } } |