From 19c8dc600150baacc03a7ac8c5e7c52d44a83aff Mon Sep 17 00:00:00 2001 From: Rodney Dawes Date: Tue, 24 Feb 2004 19:49:58 +0000 Subject: [PATCH] Check that the file exists, and continue through the loop if it doesn't 2004-02-24 Rodney Dawes * gnome-wp-xml.c (gnome_wp_oad_legacy): Check that the file exists, and continue through the loop if it doesn't (#135251) Fixes #135251 --- capplets/background/ChangeLog | 7 +++++++ capplets/background/gnome-wp-xml.c | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/capplets/background/ChangeLog b/capplets/background/ChangeLog index ab60ff8d2..19385e51b 100644 --- a/capplets/background/ChangeLog +++ b/capplets/background/ChangeLog @@ -1,3 +1,10 @@ +2004-02-24 Rodney Dawes + + * gnome-wp-xml.c (gnome_wp_oad_legacy): Check that the file exists, + and continue through the loop if it doesn't (#135251) + + Fixes #135251 + 2004-02-24 Rodney Dawes * gnome-wp-item.c (gnome_wp_item_get_thumbnail): Add some explanatory diff --git a/capplets/background/gnome-wp-xml.c b/capplets/background/gnome-wp-xml.c index 5e46ff2dc..70ad1f840 100644 --- a/capplets/background/gnome-wp-xml.c +++ b/capplets/background/gnome-wp-xml.c @@ -76,6 +76,10 @@ static void gnome_wp_load_legacy (GnomeWPCapplet * capplet) { continue; } + if (!g_file_test (foo, G_FILE_TEST_EXISTS)) { + continue; + } + item = g_new0 (GnomeWPItem, 1); item->filename = g_strdup (foo);