From d8715b0371bce4b42daa413fa2d2aaea65f8e621 Mon Sep 17 00:00:00 2001 From: Rodney Dawes Date: Fri, 15 Jul 2005 04:41:53 +0000 Subject: [PATCH] If xmlParseFile returns NULL, then just return, rather than trying to 2005-07-14 Rodney Dawes * gnome-wp-xml.c (gnome_wp_xml_load_xml): If xmlParseFile returns NULL, then just return, rather than trying to parse the document Fixes #310041 --- capplets/background/ChangeLog | 7 +++++++ capplets/background/gnome-wp-xml.c | 3 +++ 2 files changed, 10 insertions(+) diff --git a/capplets/background/ChangeLog b/capplets/background/ChangeLog index aa5cf790c..2727b8207 100644 --- a/capplets/background/ChangeLog +++ b/capplets/background/ChangeLog @@ -1,3 +1,10 @@ +2005-07-14 Rodney Dawes + + * gnome-wp-xml.c (gnome_wp_xml_load_xml): If xmlParseFile returns + NULL, then just return, rather than trying to parse the document + + Fixes #310041 + 2005-07-13 Rodney Dawes * gnome-wp-info.c (gnome_wp_info_new): Pass the md5sum to the call diff --git a/capplets/background/gnome-wp-xml.c b/capplets/background/gnome-wp-xml.c index d2e7d2dca..0b9596523 100644 --- a/capplets/background/gnome-wp-xml.c +++ b/capplets/background/gnome-wp-xml.c @@ -106,6 +106,9 @@ static void gnome_wp_xml_load_xml (GnomeWPCapplet * capplet, wplist = xmlParseFile (filename); + if (!wplist) + return; + root = xmlDocGetRootElement (wplist); for (list = root->children; list != NULL; list = list->next) {