summaryrefslogtreecommitdiff
path: root/capplets/background/gnome-wp-xml.c
diff options
context:
space:
mode:
Diffstat (limited to 'capplets/background/gnome-wp-xml.c')
-rw-r--r--capplets/background/gnome-wp-xml.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/capplets/background/gnome-wp-xml.c b/capplets/background/gnome-wp-xml.c
index 44b0fc5e1..17ac5d0c4 100644
--- a/capplets/background/gnome-wp-xml.c
+++ b/capplets/background/gnome-wp-xml.c
@@ -81,9 +81,10 @@ static void gnome_wp_load_legacy (GnomeWPCapplet * capplet) {
item->filename = g_strdup (foo);
item->fileinfo = gnome_wp_info_new (item->filename, capplet->thumbs);
+
if (item->fileinfo == NULL) {
- g_free (item);
- continue;
+ gnome_wp_item_free (item);
+ continue;
}
item->shade_type = gconf_client_get_string (capplet->client,