From c4aa487d7273ff60250e92a2eb382779075555c9 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 17 Mar 2005 18:13:46 +0000 Subject: [PATCH] Don't crash if there is no cache. (#170652, Diego Gonzalez) 2005-03-17 Matthias Clasen * gtk/gtkicontheme.c (theme_lookup_icon): Don't crash if there is no cache. (#170652, Diego Gonzalez) --- ChangeLog | 3 +++ ChangeLog.pre-2-10 | 3 +++ ChangeLog.pre-2-8 | 3 +++ gtk/gtkicontheme.c | 2 +- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a24a0a3e46..99c2c972f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2005-03-17 Matthias Clasen + * gtk/gtkicontheme.c (theme_lookup_icon): Don't crash + if there is no cache. (#170652, Diego Gonzalez) + * gtk/gtkentrycompletion.c (gtk_entry_completion_real_insert_prefix): Make inline completion insert the prefix at the right spot. (#170146, Doug Quale) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index a24a0a3e46..99c2c972f1 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,8 @@ 2005-03-17 Matthias Clasen + * gtk/gtkicontheme.c (theme_lookup_icon): Don't crash + if there is no cache. (#170652, Diego Gonzalez) + * gtk/gtkentrycompletion.c (gtk_entry_completion_real_insert_prefix): Make inline completion insert the prefix at the right spot. (#170146, Doug Quale) diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index a24a0a3e46..99c2c972f1 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,5 +1,8 @@ 2005-03-17 Matthias Clasen + * gtk/gtkicontheme.c (theme_lookup_icon): Don't crash + if there is no cache. (#170652, Diego Gonzalez) + * gtk/gtkentrycompletion.c (gtk_entry_completion_real_insert_prefix): Make inline completion insert the prefix at the right spot. (#170146, Doug Quale) diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index b5000fd5c7..d487fd8847 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -1891,7 +1891,7 @@ theme_lookup_icon (IconTheme *theme, if (min_dir->icon_data != NULL) icon_info->data = g_hash_table_lookup (min_dir->icon_data, icon_name); - else + else if (min_dir->cache != NULL) icon_info->data = _gtk_icon_cache_get_icon_data (min_dir->cache, icon_name, min_dir->subdir); if (icon_info->data == NULL &&