diff options
author | Timm Bäder <mail@baedert.org> | 2017-10-09 17:38:54 +0200 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2017-10-10 09:49:35 +0200 |
commit | 657983cfda4c84b3c9b8490e748b08ccbd47a81f (patch) | |
tree | 9cce1a8ee3760fd184904b1d2b855b20ed1f433f /gtk/gtkrendericon.c | |
parent | f50832864ecb144fc3c6804b0b728533bf413cd0 (diff) | |
download | gtk+-657983cfda4c84b3c9b8490e748b08ccbd47a81f.tar.gz |
Don't try to snapshot invisible icons
These spew criticals when width == 0 || height == 0.
Diffstat (limited to 'gtk/gtkrendericon.c')
-rw-r--r-- | gtk/gtkrendericon.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtkrendericon.c b/gtk/gtkrendericon.c index 3cecd35c00..caa700568f 100644 --- a/gtk/gtkrendericon.c +++ b/gtk/gtkrendericon.c @@ -105,6 +105,9 @@ gtk_css_style_snapshot_icon (GtkCssStyle *style, g_return_if_fail (GTK_IS_CSS_STYLE (style)); g_return_if_fail (snapshot != NULL); + if (width == 0.0 || height == 0.0) + return; + image = _gtk_css_image_value_get_image (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_ICON_SOURCE)); if (image == NULL) return; |