From e54549502e3b0b1bd8b01fc7de9c44a339e4437c Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 29 Jan 2016 23:36:24 -0500 Subject: [PATCH] icontheme: Avoid a crash gtk_icon_info_new_for_file with a size of 0 would fail for symbolic pngs because we ended up scaling with 0. Avoid this. --- gtk/gtkicontheme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index 0a0425829b..d7dc37154d 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -3949,7 +3949,7 @@ icon_info_ensure_scale_and_pixbuf (GtkIconInfo *icon_info) icon_info->scale = image_size / 1000.; else if (icon_info->scale < 0.0) { - if (image_size > 0) + if (image_size > 0 && scaled_desired_size > 0) icon_info->scale = (gdouble)scaled_desired_size / (gdouble)image_size; else icon_info->scale = 1.0;