]> Pileus Git - ~andy/gtk/commitdiff
Don't dereference a NULL error
authorMatthias Clasen <mclasen@redhat.com>
Mon, 21 Sep 2009 02:39:13 +0000 (22:39 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 21 Sep 2009 02:39:13 +0000 (22:39 -0400)
This was pointed out in bug 595790.

gtk/gtkiconfactory.c

index cced1108e54c8bbb351e8ad10c0c57c4ec8c0bfc..6578da86151c3468fbe71c27e415fe0177eb1437 100644 (file)
@@ -1500,9 +1500,10 @@ render_icon_name_pixbuf (GtkIconSource    *icon_source,
 
   if (!tmp_pixbuf)
     {
-      g_warning ("Error loading theme icon '%s' for stock: %s", 
-                 icon_source->source.icon_name, error->message);
-      g_error_free (error);
+      g_warning ("Error loading theme icon '%s' for stock: %s",
+                 icon_source->source.icon_name, error ? error->message : "");
+      if (error)
+        g_error_free (error);
       return NULL;
     }