summaryrefslogtreecommitdiff
path: root/libmate-desktop/mate-bg.c
diff options
context:
space:
mode:
authorJasmine Hassan <[email protected]>2012-12-17 11:00:57 +0200
committerJasmine Hassan <[email protected]>2012-12-17 11:00:57 +0200
commit47426c90d10e9f738ecf89f35db94ca8deff55e0 (patch)
treeb5a3331870b272a20db0174ccb384b6f77870ab4 /libmate-desktop/mate-bg.c
parent9f55f8f2358c82e4bb547c8206db0e3340595941 (diff)
downloadmate-desktop-47426c90d10e9f738ecf89f35db94ca8deff55e0.tar.bz2
mate-desktop-47426c90d10e9f738ecf89f35db94ca8deff55e0.tar.xz
[mate-bg] small cleanup
Diffstat (limited to 'libmate-desktop/mate-bg.c')
-rw-r--r--libmate-desktop/mate-bg.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/libmate-desktop/mate-bg.c b/libmate-desktop/mate-bg.c
index f150622..270ae6c 100644
--- a/libmate-desktop/mate-bg.c
+++ b/libmate-desktop/mate-bg.c
@@ -2020,18 +2020,19 @@ static gboolean
blow_expensive_caches (gpointer data)
{
MateBG *bg = data;
- GList *list, *next;
+ GList *list;
bg->blow_caches_id = 0;
- for (list = bg->file_cache; list != NULL; list = next) {
- FileCacheEntry *ent = list->data;
- next = list->next;
+ if (bg->file_cache) {
+ for (list = bg->file_cache; list != NULL; list = list->next) {
+ FileCacheEntry *ent = list->data;
- 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);
+ }
}
}