diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2007-08-23 11:38:16 +0200 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2007-08-23 11:38:16 +0200 |
commit | 92fa7cc00688d7bfc1fb72e645ac30c6d92669c6 (patch) | |
tree | 1d34662ad450903df0f5980102a091ff5e711b42 | |
parent | 5cb20c2dc5eca9d7d7d78e9924ea1b90076e7253 (diff) |
radeon: Don't call RADEONDRIRefreshArea when the damaged region is empty.
-rw-r--r-- | src/radeon_dri.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/radeon_dri.c b/src/radeon_dri.c index 7949c5b5..f057bdfd 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 |