don't crash if we could not get the file information.

2004-01-12  Diego Gonzalez <diego@pemas.net>

	* gnome-wp-xml.c (gnome_wp_load_legacy): don't crash if we could
	  not get the file information.
This commit is contained in:
Diego Gonzalez 2004-01-12 19:32:43 +00:00 committed by Jody Goldberg
parent a603a03a23
commit c8c2cd5023
2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2004-01-12 Diego Gonzalez <diego@pemas.net>
* gnome-wp-xml.c (gnome_wp_load_legacy): don't crash if we could
not get the file information.
2004-01-12 Jody Goldberg <jody@gnome.org> 2004-01-12 Jody Goldberg <jody@gnome.org>
* Makefile.am : As long as we're hard coding the path hard code it in * Makefile.am : As long as we're hard coding the path hard code it in

View file

@ -81,6 +81,10 @@ static void gnome_wp_load_legacy (GnomeWPCapplet * capplet) {
item->filename = g_strdup (foo); item->filename = g_strdup (foo);
item->fileinfo = gnome_wp_info_new (item->filename, capplet->thumbs); item->fileinfo = gnome_wp_info_new (item->filename, capplet->thumbs);
if (item->fileinfo == NULL) {
g_free (item);
continue;
}
item->shade_type = gconf_client_get_string (capplet->client, item->shade_type = gconf_client_get_string (capplet->client,
WP_SHADING_KEY, NULL); WP_SHADING_KEY, NULL);