[gtk/wip/otte/for-master: 6/10] icontheme: Don't crash on icon lookup failure
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/for-master: 6/10] icontheme: Don't crash on icon lookup failure
- Date: Thu, 5 Mar 2020 06:07:38 +0000 (UTC)
commit 6dd8d2c4c0965b5cac58646e8b2151a62e560649
Author: Benjamin Otte <otte redhat com>
Date: Thu Mar 5 06:57:44 2020 +0100
icontheme: Don't crash on icon lookup failure
gtk/gtkicontheme.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index 58c6bc4417..986d03c177 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -2209,11 +2209,12 @@ real_choose_icon (GtkIconTheme *self,
g_clear_object (&icon);
}
- icon->is_svg = suffix_from_name (icon->filename) == ICON_CACHE_FLAG_SVG_SUFFIX;
- icon->is_resource = unthemed_icon->is_resource;
-
if (icon)
- goto out;
+ {
+ icon->is_svg = suffix_from_name (icon->filename) == ICON_CACHE_FLAG_SVG_SUFFIX;
+ icon->is_resource = unthemed_icon->is_resource;
+ goto out;
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]