diff options
Diffstat (limited to 'libmate-desktop')
-rw-r--r-- | libmate-desktop/mate-bg.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/libmate-desktop/mate-bg.c b/libmate-desktop/mate-bg.c index 0f617fa..e535231 100644 --- a/libmate-desktop/mate-bg.c +++ b/libmate-desktop/mate-bg.c @@ -2002,19 +2002,18 @@ static gboolean blow_expensive_caches (gpointer data) { MateBG *bg = data; - GList *list; + GList *list, *next; bg->blow_caches_id = 0; - if (bg->file_cache) { - for (list = bg->file_cache; list != NULL; list = list->next) { - FileCacheEntry *ent = list->data; + for (list = bg->file_cache; list != NULL; list = next) { + FileCacheEntry *ent = list->data; + next = list->next; - if (ent->type == PIXBUF) { - file_cache_entry_delete (ent); - bg->file_cache = g_list_delete_link (bg->file_cache, - list); - } + if (ent->type == PIXBUF) { + file_cache_entry_delete (ent); + bg->file_cache = g_list_delete_link (bg->file_cache, + list); } } |