From c94f0cf7538bae7e740d58893a8bfcf7eca49c97 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Thu, 13 Oct 2011 13:46:30 +0200 Subject: NULL-terminate arrays that we pass to g_settings_set_strv --- calendar/gui/alarm-notify/config-data.c | 1 + calendar/gui/calendar-config.c | 1 + 2 files changed, 2 insertions(+) (limited to 'calendar') diff --git a/calendar/gui/alarm-notify/config-data.c b/calendar/gui/alarm-notify/config-data.c index f44a832b4c..3275c4d219 100644 --- a/calendar/gui/alarm-notify/config-data.c +++ b/calendar/gui/alarm-notify/config-data.c @@ -348,6 +348,7 @@ config_data_save_blessed_program (const gchar *program) g_array_append_val (array, list[i]); g_array_append_val (array, program); + g_array_append_val (array, NULL); g_settings_set_strv (calendar_settings, "notify-programs", (const gchar *const *) array->data); g_strfreev (list); diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c index 85c2e3e60d..15df6920ae 100644 --- a/calendar/gui/calendar-config.c +++ b/calendar/gui/calendar-config.c @@ -368,6 +368,7 @@ calendar_config_set_day_second_zone (const gchar *location) array = g_ptr_array_new (); for (i = 0, l = lst; i < max_zones && l != NULL; i++, l = l->next) g_ptr_array_add (array, l->data); + g_ptr_array_add (array, NULL); g_settings_set_strv (config, "day-second-zones", (const gchar * const *) array->pdata); -- cgit