diff options
author | Siarhei Siamashka <siarhei.siamashka@nokia.com> | 2011-01-10 21:01:16 +0200 |
---|---|---|
committer | Siarhei Siamashka <siarhei.siamashka@nokia.com> | 2011-01-20 02:14:07 +0200 |
commit | a8e4677ecc2fcbf16a53902e26fc82d0860e9a21 (patch) | |
tree | 8029597d1bb94693f0f73b905d5e4096177cdd2c | |
parent | a6a04c07c354e10d787193af8d2f6a6d27f374ad (diff) |
The code in 'bitmap_addrect' already assumes non-null 'reg->data'
So the check of 'reg->data' pointer can be safely removed.
-rw-r--r-- | pixman/pixman-region.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pixman/pixman-region.c b/pixman/pixman-region.c index 4e7c8db7..142493b7 100644 --- a/pixman/pixman-region.c +++ b/pixman/pixman-region.c @@ -2545,8 +2545,7 @@ bitmap_addrect (region_type_t *reg, ((r-1)->y1 == ry1) && ((r-1)->y2 == ry2) && ((r-1)->x1 <= rx1) && ((r-1)->x2 >= rx2)))) { - if (!reg->data || - reg->data->numRects == reg->data->size) + if (reg->data->numRects == reg->data->size) { if (!pixman_rect_alloc (reg, 1)) return NULL; @@ -2590,6 +2589,8 @@ PREFIX (_init_from_image) (region_type_t *region, PREFIX(_init) (region); + critical_if_fail (region->data); + return_if_fail (image->type == BITS); return_if_fail (image->bits.format == PIXMAN_a1); |