From 374fa4bb4a4657008ee3122b5d46737137a5c734 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Thu, 22 Jan 2009 15:15:40 +0000 Subject: [PATCH] g_return_if_fail() on icon_name != NULL so we get a warning instead of a 2009-01-22 Michael Natterer * gtk/gtkicontheme.c (gtk_icon_theme_has_icon): g_return_if_fail() on icon_name != NULL so we get a warning instead of a crash here. svn path=/trunk/; revision=22174 --- ChangeLog | 5 +++++ gtk/gtkicontheme.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f52f96e6af..73bb966ba0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-01-22 Michael Natterer + + * gtk/gtkicontheme.c (gtk_icon_theme_has_icon): g_return_if_fail() + on icon_name != NULL so we get a warning instead of a crash here. + 2009-01-21 Matthias Clasen * NEWS: Updates diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index 5fc1b3b20b..6df05ef80e 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -1571,7 +1571,8 @@ gtk_icon_theme_has_icon (GtkIconTheme *icon_theme, GList *l; g_return_val_if_fail (GTK_IS_ICON_THEME (icon_theme), FALSE); - + g_return_val_if_fail (icon_name != NULL, FALSE); + priv = icon_theme->priv; ensure_valid_themes (icon_theme);