[gtk+/gtk-3-8] Fix a crash in icon handling



commit fc4263535b93ee96c25db0b89f1dea623b76e6d6
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Oct 15 08:04:25 2013 -0400

    Fix a crash in icon handling
    
    The load_error was freed in two places.
    Fix based on a patch in
    https://bugzilla.gnome.org/show_bug.cgi?id=709967

 gtk/gtkicontheme.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index 371bbb2..57a9e97 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -3577,12 +3577,17 @@ gtk_icon_info_load_icon (GtkIconInfo *icon_info,
   if (!icon_info_ensure_scale_and_pixbuf (icon_info, FALSE))
     {
       if (icon_info->load_error)
-        g_propagate_error (error, icon_info->load_error);
+        {
+          if (error)
+            *error = g_error_copy (icon_info->load_error);
+        }
       else
-        g_set_error_literal (error,  
-                             GTK_ICON_THEME_ERROR,  
-                             GTK_ICON_THEME_NOT_FOUND,
-                             _("Failed to load icon"));
+        {
+          g_set_error_literal (error,  
+                               GTK_ICON_THEME_ERROR,  
+                               GTK_ICON_THEME_NOT_FOUND,
+                               _("Failed to load icon"));
+        }
  
       return NULL;
     }


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