[gtk+/gtk-3-18] icon theme: Ensure to propagate an error
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-18] icon theme: Ensure to propagate an error
- Date: Mon, 9 Nov 2015 13:52:20 +0000 (UTC)
commit 08db197af2bc37cdfeb72fcbeb78924b5cebcc74
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]