[gtk+] GtkIconTheme: Be more careful when warning
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkIconTheme: Be more careful when warning
- Date: Mon, 23 Jun 2014 16:21:49 +0000 (UTC)
commit 30982b6d4e29a8798c9942151f30c2b90500e355
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jun 23 12:13:22 2014 -0400
GtkIconTheme: Be more careful when warning
It sucks when printing a warning causes gnome-shell to crash,
so be more careful about icon names being NULL here.
gtk/gtkicontheme.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index c3385e0..8a1f835 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -4208,12 +4208,12 @@ gtk_icon_info_load_symbolic_internal (GtkIconInfo *icon_info,
g_object_unref (pixbuf);
}
- if (icon_info->dir_type != ICON_THEME_DIR_SCALABLE)
- g_warning ("Symbolic icon %s is not in a scalable icon theme directory",
- icon_info->key.icon_names[0]);
+ if (icon_info->dir_type == ICON_THEME_DIR_UNTHEMED)
+ g_warning ("Symbolic icon %s is not in an icon theme directory",
+ icon_info->key.icon_names ? icon_info->key.icon_names[0] : icon_info->filename);
else if (icon_info->dir_size * icon_info->dir_scale != icon_info->symbolic_size)
g_warning ("Symbolic icon %s of size %d is in an icon theme directory of size %d",
- icon_info->key.icon_names[0],
+ icon_info->key.icon_names ? icon_info->key.icon_names[0] : icon_info->filename,
icon_info->symbolic_size,
icon_info->dir_size * icon_info->dir_scale);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]