From 4b70fe8421f5132c585ff1dfb8d90229be26e71f Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Wed, 29 Sep 2010 08:32:12 -0400 Subject: glx: Only remove drawables from the hash when we actually delete them https://bugs.freedesktop.org/show_bug.cgi?id=30457 --- src/glx/dri_common.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c index 5fb5255416..83d6e3c310 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); + } } } -- cgit v1.2.3