diff options
author | Matthias Clasen <maclas@gmx.de> | 2004-06-26 05:08:36 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2004-06-26 05:08:36 +0000 |
commit | 0f9a4da84d22dfa34cdec0eb8c687a0da43fd96b (patch) | |
tree | f886165634cda2f8b589719b2366152b64c08095 /gtk | |
parent | 957743919b207e532649e1bfda112dc34dc4ca7b (diff) | |
download | gtk+-0f9a4da84d22dfa34cdec0eb8c687a0da43fd96b.tar.gz |
Prevent unwanted recursion by resetting icon_set->cache before freeing the
Sat Jun 26 01:04:31 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkiconfactory.c (clear_cache): Prevent unwanted
recursion by resetting icon_set->cache before freeing
the cache. (#144947, Tim Janik)
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkiconfactory.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gtk/gtkiconfactory.c b/gtk/gtkiconfactory.c index 52b50e8642..a8dd18bd0e 100644 --- a/gtk/gtkiconfactory.c +++ b/gtk/gtkiconfactory.c @@ -2654,10 +2654,13 @@ static void clear_cache (GtkIconSet *icon_set, gboolean style_detach) { - GSList *tmp_list; + GSList *cache, *tmp_list; GtkStyle *last_style = NULL; - tmp_list = icon_set->cache; + cache = icon_set->cache; + icon_set->cache = NULL; + icon_set->cache_size = 0; + tmp_list = cache; while (tmp_list != NULL) { CachedIcon *icon = tmp_list->data; @@ -2681,9 +2684,7 @@ clear_cache (GtkIconSet *icon_set, tmp_list = g_slist_next (tmp_list); } - g_slist_free (icon_set->cache); - icon_set->cache = NULL; - icon_set->cache_size = 0; + g_slist_free (cache); } static GSList* |