gnome-panel r10956 - trunk/applets/clock



Author: wlach
Date: Thu Mar 13 12:33:27 2008
New Revision: 10956
URL: http://svn.gnome.org/viewvc/gnome-panel?rev=10956&view=rev

Log:
Fix crash in clock applet when there are no locations available.

Modified:
   trunk/applets/clock/ChangeLog
   trunk/applets/clock/clock.c

Modified: trunk/applets/clock/clock.c
==============================================================================
--- trunk/applets/clock/clock.c	(original)
+++ trunk/applets/clock/clock.c	Thu Mar 13 12:33:27 2008
@@ -3414,10 +3414,10 @@
 	model = gtk_tree_view_get_model (tree);
 
 	selection = gtk_tree_view_get_selection (tree);
-	gtk_tree_model_get_iter_first (model, &iter);
-
+	
 	location = gtk_entry_get_text (GTK_ENTRY (entry));
-	if (find_location (model, &iter, location, TRUE)) {
+	if (gtk_tree_model_get_iter_first (model, &iter) && 
+            find_location (model, &iter, location, TRUE)) {
 		gtk_widget_set_sensitive (cd->find_next_location_button, TRUE);
 		path = gtk_tree_model_get_path (model, &iter);
 		gtk_tree_view_expand_to_path (tree, path);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]