aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2013-10-26 16:37:14 -0400
committerLars Uebernickel <lars.uebernickel@canonical.com>2013-10-26 16:37:14 -0400
commit378c70c707550cb66f5c6b138fb5f3b7ff737bc2 (patch)
treeab5b4d3b6d447d0853bed0b795aaefff11a30e4c /src
parentf1fe817863e7f167fdb4f98ebd9e5fed33d659b3 (diff)
downloadayatana-indicator-datetime-378c70c707550cb66f5c6b138fb5f3b7ff737bc2.tar.gz
ayatana-indicator-datetime-378c70c707550cb66f5c6b138fb5f3b7ff737bc2.tar.bz2
ayatana-indicator-datetime-378c70c707550cb66f5c6b138fb5f3b7ff737bc2.zip
datetime panel: don't try to add empty location names
Otherwise NULL is passed into g_utf8_collate_key().
Diffstat (limited to 'src')
-rw-r--r--src/datetime-prefs-locations.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/datetime-prefs-locations.c b/src/datetime-prefs-locations.c
index ca3d9b5..f953ec7 100644
--- a/src/datetime-prefs-locations.c
+++ b/src/datetime-prefs-locations.c
@@ -96,7 +96,9 @@ time_location_array_new_from_model (GtkTreeModel * model)
COL_ZONE, &zone,
COL_VISIBLE_NAME, &name,
-1);
- list = g_slist_prepend (list, time_location_new (zone, name, pos++, now));
+
+ if (zone && name)
+ list = g_slist_prepend (list, time_location_new (zone, name, pos++, now));
g_free (name);
g_free (zone);