From b0d1ae4a5c972fcea1462b9067979f202cac8fa3 Mon Sep 17 00:00:00 2001 From: Kjell Ahlstedt Date: Fri, 10 Nov 2017 16:48:30 +0100 Subject: [PATCH] GtkCssImageIconTheme: Don't try to unref a NULL pointer In gtk_css_image_icon_theme_snapshot(), don't try to unref icon_info if it's NULL. https://bugzilla.gnome.org/show_bug.cgi?id=790171 --- gtk/gtkcssimageicontheme.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gtk/gtkcssimageicontheme.c b/gtk/gtkcssimageicontheme.c index 399f7b4f2b..1183bd8962 100644 --- a/gtk/gtkcssimageicontheme.c +++ b/gtk/gtkcssimageicontheme.c @@ -100,7 +100,8 @@ gtk_css_image_icon_theme_snapshot (GtkCssImage *image, icon_theme->cached_symbolic = symbolic; g_object_unref (pixbuf); - g_object_unref (icon_info); + if (icon_info) + g_object_unref (icon_info); } texture_width = (double) gdk_texture_get_width (texture) / icon_theme->scale;