From: Kristian Høgsberg Date: Wed, 29 Sep 2010 12:32:12 +0000 (-0400) Subject: glx: Only remove drawables from the hash when we actually delete them X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4b70fe8421f5132c585ff1dfb8d90229be26e71f;p=mesa.git glx: Only remove drawables from the hash when we actually delete them https://bugs.freedesktop.org/show_bug.cgi?id=30457 --- 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); + } } }