aboutsummaryrefslogtreecommitdiff
path: root/src/datetime-prefs-locations.c
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2013-10-28 16:19:49 +0000
committerTarmac <Unknown>2013-10-28 16:19:49 +0000
commitd799095e1ace348b664ba3f4544749f925898d2b (patch)
treeb8ee0adbec96c83dfea67ba68e777edb23145cfc /src/datetime-prefs-locations.c
parent9e2f24172c1fa388e2be2938998b20f5bf3a8241 (diff)
parent378c70c707550cb66f5c6b138fb5f3b7ff737bc2 (diff)
downloadayatana-indicator-datetime-d799095e1ace348b664ba3f4544749f925898d2b.tar.gz
ayatana-indicator-datetime-d799095e1ace348b664ba3f4544749f925898d2b.tar.bz2
ayatana-indicator-datetime-d799095e1ace348b664ba3f4544749f925898d2b.zip
datetime panel: don't try to add empty location names
Otherwise NULL is passed into g_utf8_collate_key(). Approved by Charles Kerr, PS Jenkins bot.
Diffstat (limited to 'src/datetime-prefs-locations.c')
-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);