If we are passed in a NULL just return rather than using g_return_if_fail

2006-01-26  Rodney Dawes  <dobey@novell.com>

	* gnome-wp-capplet.c (gnome_wp_capplet_scroll_to_item): If we are
	passed in a NULL just return rather than using g_return_if_fail to
	do it, so that we can avoid the glib CRITICAL warning (#327327)
	(gnome_wp_load_stuffs): If the settings are mangled some how, and
	a valid item was not duplicated, duplicated the "No Wallpaper" item

	Fixes #327327
This commit is contained in:
Rodney Dawes 2006-01-27 03:15:06 +00:00 committed by Rodney Dawes
parent f69be2bd96
commit 0a696e12e8
2 changed files with 16 additions and 1 deletions

View file

@ -1,3 +1,13 @@
2006-01-26 Rodney Dawes <dobey@novell.com>
* gnome-wp-capplet.c (gnome_wp_capplet_scroll_to_item): If we are
passed in a NULL just return rather than using g_return_if_fail to
do it, so that we can avoid the glib CRITICAL warning (#327327)
(gnome_wp_load_stuffs): If the settings are mangled some how, and
a valid item was not duplicated, duplicated the "No Wallpaper" item
Fixes #327327
2006-01-26 Rodney Dawes <dobey@novell.com>
* gnome-background-properties.glade: Add an Apply button

View file

@ -81,7 +81,9 @@ static void gnome_wp_capplet_scroll_to_item (GnomeWPCapplet * capplet,
GtkTreePath * path;
g_return_if_fail (capplet != NULL);
g_return_if_fail (item != NULL);
if (item == NULL)
return;
path = gtk_tree_row_reference_get_path (item->rowref);
gtk_tree_view_set_cursor (GTK_TREE_VIEW (capplet->treeview), path,
@ -699,6 +701,9 @@ static gboolean gnome_wp_load_stuffs (void * data) {
g_slist_free (capplet->uri_list);
}
if (capplet->old_item == NULL && item != NULL)
capplet->old_item = gnome_wp_item_dup (item);
return FALSE;
}