Index: capplets/mouse/gnome-mouse-properties.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/mouse/gnome-mouse-properties.c,v
retrieving revision 1.55
diff -u -p -r1.55 gnome-mouse-properties.c
--- capplets/mouse/gnome-mouse-properties.c	12 Jul 2005 18:29:13 -0000	1.55
+++ capplets/mouse/gnome-mouse-properties.c	31 Jul 2005 15:29:34 -0000
@@ -470,30 +470,29 @@ cursor_theme_changed (GConfClient *clien
 	GtkTreeModel    * smodel    = gtk_tree_view_get_model(view);
 	GtkTreeModel    * model     = gtk_tree_model_sort_get_model(GTK_TREE_MODEL_SORT(smodel));
 	gchar           * theme     = gconf_client_get_string (client, CURSOR_THEME_KEY, NULL);
-	gtk_tree_model_get_iter_root(model, &iter);
 	gint              size      = gconf_client_get_int (client, CURSOR_SIZE_KEY, NULL);
-	gtk_tree_model_get_iter_root(model, &iter);
 
-	do {
-		gchar* theme_name;
-		gint cursor_size;
-
-		gtk_tree_model_get(model, &iter,
-				   COLUMN_FONT_PATH, &theme_name,
-				   COLUMN_SIZE, &cursor_size,
-				   -1);
-
-		if(theme_name && theme && !strcmp(theme_name, theme) && cursor_size == size) {
-			GtkTreeIter sort_iter;
-			gtk_tree_model_sort_convert_child_iter_to_iter
-				(GTK_TREE_MODEL_SORT(smodel), &sort_iter, &iter);
-			gtk_tree_selection_select_iter(selection, &sort_iter);
-			g_free(theme);
+	if (gtk_tree_model_get_iter_root(model, &iter))
+		do {
+			gchar* theme_name;
+			gint cursor_size;
+
+			gtk_tree_model_get(model, &iter,
+					   COLUMN_FONT_PATH, &theme_name,
+					   COLUMN_SIZE, &cursor_size,
+					   -1);
+
+			if(theme_name && theme && !strcmp(theme_name, theme) && cursor_size == size) {
+				GtkTreeIter sort_iter;
+				gtk_tree_model_sort_convert_child_iter_to_iter
+					(GTK_TREE_MODEL_SORT(smodel), &sort_iter, &iter);
+				gtk_tree_selection_select_iter(selection, &sort_iter);
+				g_free(theme);
+				g_free(theme_name);
+				return;
+			}
 			g_free(theme_name);
-			return;
-		}
-		g_free(theme_name);
-	} while (gtk_tree_model_iter_next(model, &iter));
+		} while (gtk_tree_model_iter_next(model, &iter));
 
 	/* we didn't find it */
 	gtk_tree_selection_unselect_all(gtk_tree_view_get_selection(view));
