From 92fa7cc00688d7bfc1fb72e645ac30c6d92669c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Thu, 23 Aug 2007 11:38:16 +0200 Subject: radeon: Don't call RADEONDRIRefreshArea when the damaged region is empty. --- src/radeon_dri.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/radeon_dri.c b/src/radeon_dri.c index 7949c5b..f057bdf 100644 --- a/src/radeon_dri.c +++ b/src/radeon_dri.c @@ -398,10 +398,10 @@ static void RADEONLeaveServer(ScreenPtr pScreen) #ifdef DAMAGE if (info->pDamage) { RegionPtr pDamageReg = DamageRegion(info->pDamage); + int nrects = pDamageReg ? REGION_NUM_RECTS(pDamageReg) : 0; - if (pDamageReg) { - RADEONDRIRefreshArea(pScrn, REGION_NUM_RECTS(pDamageReg), - REGION_RECTS(pDamageReg)); + if (nrects) { + RADEONDRIRefreshArea(pScrn, nrects, REGION_RECTS(pDamageReg)); } } #endif -- cgit v1.2.3