diff options
author | Matthias Hopf <mhopf@suse.de> | 2010-03-24 12:00:21 +0100 |
---|---|---|
committer | Matthias Hopf <mhopf@suse.de> | 2010-03-24 14:51:05 +0100 |
commit | ebba1493136a5a0dd7667073165b2115de203eda (patch) | |
tree | d3b6ff81967df8fbef2384f895700ea177c1400d | |
parent | c0f8d417b512b7d526fb6127954a50d14214f420 (diff) |
Improve PIXREGION_NIL to return true on degenerated regions.
Fixes Novell bug 568811.
-rw-r--r-- | pixman/pixman-region.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pixman/pixman-region.c b/pixman/pixman-region.c index a6a40058..179241db 100644 --- a/pixman/pixman-region.c +++ b/pixman/pixman-region.c @@ -69,7 +69,11 @@ #include <stdio.h> #include "pixman-private.h" -#define PIXREGION_NIL(reg) ((reg)->data && !(reg)->data->numRects) +#define PIXREGION_NIL(reg) (((reg)->data && !(reg)->data->numRects) || \ + (! (reg)->data && \ + (reg)->extents.x1 == (reg)->extents.x2 && \ + (reg)->extents.y1 == (reg)->extents.y2)) + /* not a region */ #define PIXREGION_NAR(reg) ((reg)->data == pixman_broken_data) #define PIXREGION_NUMRECTS(reg) ((reg)->data ? (reg)->data->numRects : 1) |