[gtk+] icon theme: Ensure to propagate an error



commit 270e900f55f230c493956c5d10ab0b98cd42061b
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Oct 27 11:05:00 2015 -0400

    icon theme: Ensure to propagate an error
    
    If the svg pixbuf loader is not available, we end up with criticals
    from gtk_css_image_icon_theme_draw because gtk_icon_info_load_symbolic
    returns NULL without setting an error.
    
    Avoid this by propagating the load error.

 gtk/gtkicontheme.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index 001dc22..59e99fc 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -4441,7 +4441,11 @@ gtk_icon_info_load_symbolic_svg (GtkIconInfo    *icon_info,
     return NULL;
 
   if (!icon_info_ensure_scale_and_pixbuf (icon_info))
-    return NULL;
+    {
+      g_propagate_error (error, icon_info->load_error);
+      icon_info->load_error = NULL;
+      return NULL;
+    }
 
   if (icon_info->symbolic_width == 0 ||
       icon_info->symbolic_height == 0)


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