pixman: Branch 'master'

Benjamin Otte company at kemper.freedesktop.org
Mon Jul 20 14:46:24 PDT 2009


 pixman/pixman-region.c |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit a3ad8bb5412f47776285bfc954d2275f075c8796
Author: Benjamin Otte <otte at gnome.org>
Date:   Mon Jul 20 23:38:36 2009 +0200

    Handle degenerate case in pixman_init_extents()
    
    Create an empty region instead

diff --git a/pixman/pixman-region.c b/pixman/pixman-region.c
index a37d381..cb8f1aa 100644
--- a/pixman/pixman-region.c
+++ b/pixman/pixman-region.c
@@ -356,6 +356,11 @@ PREFIX (_init_rect) (region_type_t *	region,
 PIXMAN_EXPORT void
 PREFIX (_init_with_extents) (region_type_t *region, box_type_t *extents)
 {
+    if (extents->x1 >= extents->x2 || extents->y1 > extents->y2)
+    {
+        PREFIX (_init) (region);
+        return;
+    }
     region->extents = *extents;
 
     region->data = NULL;


More information about the xorg-commit mailing list