[gtk+] GtkCssImageIconTheme: Don't try to unref a NULL pointer



commit b0d1ae4a5c972fcea1462b9067979f202cac8fa3
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Fri Nov 10 16:48:30 2017 +0100

    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 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcssimageicontheme.c b/gtk/gtkcssimageicontheme.c
index 399f7b4..1183bd8 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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]