summaryrefslogtreecommitdiff
path: root/gtk/gtkcssimage.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2012-10-27 01:31:59 +0200
committerBenjamin Otte <otte@redhat.com>2012-10-31 11:09:10 +0100
commit016647edb188386c62d76d2c684a46ad37fa097b (patch)
tree804ca61acaf8f93f139c53d25986ed95f57eafa3 /gtk/gtkcssimage.c
parenta68e76e05839a1934921e481426dd250ae0b392e (diff)
downloadgtk+-016647edb188386c62d76d2c684a46ad37fa097b.tar.gz
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.
Diffstat (limited to 'gtk/gtkcssimage.c')
-rw-r--r--gtk/gtkcssimage.c2
1 files changed, 2 insertions, 0 deletions
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);