summaryrefslogtreecommitdiff
path: root/gweather
diff options
context:
space:
mode:
authorCallum McKenzie <callum@src.gnome.org>2009-03-21 02:12:11 +0000
committerCallum McKenzie <callum@src.gnome.org>2009-03-21 02:12:11 +0000
commit94b7b6e2dd8e7a3c1d1b86152594e12d93fed796 (patch)
treed08f015a74ea2c38150573c5a1fdc515a675a071 /gweather
parent56f173f7ef78fde5eeb1b7719c03cc053710f5c0 (diff)
Fix for bug 554856 (crasher when searching the locations tree in gweather-applet).
svn path=/trunk/; revision=11399
Diffstat (limited to 'gweather')
-rw-r--r--gweather/ChangeLog5
-rw-r--r--gweather/gweather-pref.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/gweather/ChangeLog b/gweather/ChangeLog
index e15ebb8dd..f524e0e0d 100644
--- a/gweather/ChangeLog
+++ b/gweather/ChangeLog
@@ -1,3 +1,8 @@
+2009-03-21 Callum McKenzie <callum@spooky-possum.org>
+
+ * gweather-pref.c: Protect against an empty list of locations when
+ searching. Fixes bug 554856.
+
2009-03-20 Callum McKenzie <callum@spooky-possum.org>
* gweather-pref.c:
diff --git a/gweather/gweather-pref.c b/gweather/gweather-pref.c
index d0e20fc7b..4d8465ea7 100644
--- a/gweather/gweather-pref.c
+++ b/gweather/gweather-pref.c
@@ -710,6 +710,8 @@ find_entry_changed (GtkEditable *entry, GWeatherPref *pref)
tree = GTK_TREE_VIEW (pref->priv->tree);
model = gtk_tree_view_get_model (tree);
+ g_return_if_fail (model != NULL);
+
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree));
gtk_tree_model_get_iter_first (model, &iter);