From: Alan Hourihane Date: Wed, 17 Oct 2007 18:39:41 +0000 (+0100) Subject: Merge branch 'master' of git+ssh://git.freedesktop.org/git/pixman into yuv-porting X-Git-Tag: 1.0_branch~1424 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8aa38d2256c191bf3437034f6176bae30c3c3d19;p=profile%2Fivi%2Fpixman.git Merge branch 'master' of git+ssh://git.freedesktop.org/git/pixman into yuv-porting Conflicts: pixman/pixman-image.c --- 8aa38d2256c191bf3437034f6176bae30c3c3d19 diff --cc pixman/pixman-image.c index 0bcd901,d40234d..1c4abc2 --- a/pixman/pixman-image.c +++ b/pixman/pixman-image.c @@@ -320,23 -345,26 +345,26 @@@ pixman_image_create_bits (pixman_format pixman_image_t *image; uint32_t *free_me = NULL; - /* must be a whole number of uint32_t's + /* must be a whole number of uint32_t's */ return_val_if_fail (bits == NULL || - (rowstride_bytes % sizeof (uint32_t)) == 0, NULL); + (rowstride_bytes % sizeof (uint32_t)) == 0, NULL); - if (!bits) + if (!bits && width && height) { free_me = bits = create_bits (format, width, height, &rowstride_bytes); if (!bits) return NULL; } - + image = allocate_image(); - if (!image) + if (!image) { + if (free_me) + free (free_me); return NULL; - + } + image->type = BITS; image->bits.format = format; image->bits.width = width;