projects
/
profile
/
ivi
/
pixman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
854ec2e
)
Handle degenerate case in pixman_init_extents()
author
Benjamin Otte
<otte@gnome.org>
Mon, 20 Jul 2009 21:38:36 +0000
(23:38 +0200)
committer
Benjamin Otte
<otte@gnome.org>
Mon, 20 Jul 2009 21:45:18 +0000
(23:45 +0200)
Create an empty region instead
pixman/pixman-region.c
patch
|
blob
|
history
diff --git
a/pixman/pixman-region.c
b/pixman/pixman-region.c
index
a37d381
..
cb8f1aa
100644
(file)
--- 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;