static Bool damageDestroyPixmap (PixmapPtr pPixmap) { ScreenPtr pScreen = pPixmap->drawable.pScreen; damageScrPriv(pScreen); if (pPixmap->refcnt == 1) { (1) DamagePtr *pPrev = getPixmapDamageRef (pPixmap); DamagePtr pDamage; pDamage = *pPrev; (2) while ((pDamage = *pPrev)) { //call damageRemoveDamage (pPrev, pDamage); (3) while (*pPrev) { (4) if (*pPrev == pDamage) { *pPrev = pDamage->pNext; break; } pPrev = &(*pPrev)->pNext; } #if DAMAGE_VALIDATE_ENABLE ErrorF ("Damage not on list\n"); abort (); //BAIL OUT BY SENDING SIGABRT RUNNING PROGRAM #endif //exit damageRemoveDamage (5) if (!pDamage->isWindow) { //Execute DamageDestroy if pDamage->isWindow is ==0 <<--TEST FAILS (gdb reports isWindow = 135749408) //call DamageDestroy (pDamage); if (pDamage->damageDestroy) (*pDamage->damageDestroy) (pDamage, pDamage->closure); REGION_UNINIT (pDamage->pDrawable->pScreen, &pDamage->damage); REGION_UNINIT (pDamage->pDrawable->pScreen, &pDamage->pendingDamage); //exit DamageDestroy } xfree (pDamage); } } unwrap (pScrPriv, pScreen, DestroyPixmap); (*pScreen->DestroyPixmap) (pPixmap); wrap (pScrPriv, pScreen, DestroyPixmap, damageDestroyPixmap); return TRUE; }