summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/radeon_dri.c6
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