diff options
Diffstat (limited to 'gtk/gtkiconfactory.c')
-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* |