From 5aec05265fab8720bc7dc80c748f21de34c783f5 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 30 Jan 2009 17:56:36 -0800 Subject: [PATCH] damage: attempt to catch list mangling with register vs unregister. --- miext/damage/damage.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/miext/damage/damage.c b/miext/damage/damage.c index ade6735..7f2f5d1 100644 --- a/miext/damage/damage.c +++ b/miext/damage/damage.c @@ -57,7 +57,7 @@ (a)->x2 == (b)->x2 && \ (a)->y2 == (b)->y2) -#define DAMAGE_VALIDATE_ENABLE 0 +#define DAMAGE_VALIDATE_ENABLE 1 #define DAMAGE_DEBUG_ENABLE 0 #if DAMAGE_DEBUG_ENABLE #define DAMAGE_DEBUG(x) ErrorF x @@ -1970,6 +1970,9 @@ void DamageUnregister (DrawablePtr pDrawable, DamagePtr pDamage) { + if (pDamage->pDrawable != pDrawable) + FatalError("You're doing it wrong: %p %p\n", pDrawable, pDamage->pDrawable); + if (pDrawable->type == DRAWABLE_WINDOW) { WindowPtr pWindow = (WindowPtr) pDrawable; -- 1.5.6.5