From 016647edb188386c62d76d2c684a46ad37fa097b Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sat, 27 Oct 2012 01:31:59 +0200 Subject: cssimage: Add a warning for drawing empty images width and height of an image must be > 0 for the image to get drawn. It's up to the code further up to ensure that this is not happening. --- gtk/gtkcssimage.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtk/gtkcssimage.c b/gtk/gtkcssimage.c index abe95ae6c0..167af64a91 100644 --- a/gtk/gtkcssimage.c +++ b/gtk/gtkcssimage.c @@ -229,6 +229,8 @@ _gtk_css_image_draw (GtkCssImage *image, g_return_if_fail (GTK_IS_CSS_IMAGE (image)); g_return_if_fail (cr != NULL); + g_return_if_fail (width > 0); + g_return_if_fail (height > 0); cairo_save (cr); -- cgit v1.2.1