[gtk+] Don't dereference a NULL error



commit 5ed8cf50b8a319275b7b4b6093f0010820fa22d1
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Sep 20 22:39:13 2009 -0400

    Don't dereference a NULL error
    
    This was pointed out in bug 595790.

 gtk/gtkiconfactory.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkiconfactory.c b/gtk/gtkiconfactory.c
index cced110..6578da8 100644
--- a/gtk/gtkiconfactory.c
+++ b/gtk/gtkiconfactory.c
@@ -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;
     }
   



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