summaryrefslogtreecommitdiff
path: root/src/i830_uxa.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/i830_uxa.c')
-rw-r--r--src/i830_uxa.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/i830_uxa.c b/src/i830_uxa.c
index 1b27e83f..9da1a2f4 100644
--- a/src/i830_uxa.c
+++ b/src/i830_uxa.c
@@ -248,6 +248,15 @@ static void i830_uxa_solid(PixmapPtr pixmap, int x1, int y1, int x2, int y2)
unsigned long pitch;
uint32_t cmd;
+ if (x1 < 0)
+ x1 = 0;
+ if (y1 < 0)
+ y1 = 0;
+ if (x2 > pixmap->drawable.width)
+ x2 = pixmap->drawable.width;
+ if (y2 > pixmap->drawable.height)
+ y2 = pixmap->drawable.height;
+
pitch = i830_pixmap_pitch(pixmap);
{