summaryrefslogtreecommitdiffstats
path: root/gfx/cairo/10-zero-sized-image.patch
blob: 887341566a985ef884e054955b2a906e0e5263ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/gfx/cairo/cairo/src/cairo-image-surface.c b/gfx/cairo/cairo/src/cairo-image-surface.c
--- a/gfx/cairo/cairo/src/cairo-image-surface.c
+++ b/gfx/cairo/cairo/src/cairo-image-surface.c
@@ -1243,6 +1243,9 @@ static cairo_image_color_t
     int x, y;
     cairo_image_color_t color;
 
+    if (image->width == 0 || image->height == 0)
+	return CAIRO_IMAGE_IS_MONOCHROME;
+
     if (image->format == CAIRO_FORMAT_A1)
 	return CAIRO_IMAGE_IS_MONOCHROME;