aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r300/radeon_ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/r300/radeon_ioctl.c')
-rw-r--r--src/mesa/drivers/dri/r300/radeon_ioctl.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/r300/radeon_ioctl.c b/src/mesa/drivers/dri/r300/radeon_ioctl.c
index 31a000d5e66..0c1a19507b2 100644
--- a/src/mesa/drivers/dri/r300/radeon_ioctl.c
+++ b/src/mesa/drivers/dri/r300/radeon_ioctl.c
@@ -215,16 +215,18 @@ void radeonCopyBuffer(__DRIdrawablePrivate * dPriv,
if (rect->y2 < b->y2)
b->y2 = rect->y2;
- if (b->x1 < b->x2 && b->y1 < b->y2)
- b++;
+ if (b->x1 >= b->x2 || b->y1 >= b->y2)
+ continue;
}
- else
- b++;
+ b++;
n++;
}
radeon->sarea->nbox = n;
+ if (!n)
+ continue;
+
ret = drmCommandNone(radeon->dri.fd, DRM_RADEON_SWAP);
if (ret) {