summaryrefslogtreecommitdiff
path: root/miext/damage/damage.c
diff options
context:
space:
mode:
Diffstat (limited to 'miext/damage/damage.c')
-rw-r--r--miext/damage/damage.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/miext/damage/damage.c b/miext/damage/damage.c
index a98c20ec0..cf4b61a20 100644
--- a/miext/damage/damage.c
+++ b/miext/damage/damage.c
@@ -1637,7 +1637,6 @@ damageDestroyWindow(WindowPtr pWindow)
damageScrPriv(pScreen);
while ((pDamage = damageGetWinPriv(pWindow))) {
- DamageUnregister(&pWindow->drawable, pDamage);
DamageDestroy(pDamage);
}
unwrap(pScrPriv, pScreen, DestroyWindow);
@@ -1888,6 +1887,9 @@ DamageDestroy(DamagePtr pDamage)
damageScrPriv(pScreen);
+ if (pDamage->pDrawable)
+ DamageUnregister(pDamage->pDrawable, pDamage);
+
if (pDamage->damageDestroy)
(*pDamage->damageDestroy) (pDamage, pDamage->closure);
(*pScrPriv->funcs.Destroy) (pDamage);