aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJavier Jardón <javier.jardon@codethink.co.uk>2011-10-03 18:04:41 +0100
committerJavier Jardón <javier.jardon@codethink.co.uk>2011-10-03 18:04:41 +0100
commitd17c6fcb5d136c85547bf587de8e44bdd35db06b (patch)
treef8b15888c3d758f6376c038dab9337a1c6063baa /src
parente3d99cf9defeefcdfe25adfa6bcad98f2d16eac6 (diff)
downloadayatana-indicator-datetime-d17c6fcb5d136c85547bf587de8e44bdd35db06b.tar.gz
ayatana-indicator-datetime-d17c6fcb5d136c85547bf587de8e44bdd35db06b.tar.bz2
ayatana-indicator-datetime-d17c6fcb5d136c85547bf587de8e44bdd35db06b.zip
datetime-service: Free accounts list in the correct place
Diffstat (limited to 'src')
-rw-r--r--src/datetime-service.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c
index 670e4d0..9d43a70 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -498,11 +498,12 @@ check_for_calendar (gpointer user_data)
G_CALLBACK (activate_cb), "evolution -c calendar");
GSList *accounts_list = gconf_client_get_list (gconf, "/apps/evolution/mail/accounts", GCONF_VALUE_STRING, &error);
- if (error != NULL || accounts_list == NULL) {
- g_debug("%s: No mail accounts, do not show the 'Add Event...' menu item", G_STRFUNC);
+ if (error != NULL) {
+ g_debug("%s: Failed to get evolution mail accounts", G_STRFUNC);
g_clear_error (&error);
accounts_list = NULL;
- } else {
+ } else if (accounts_list != NULL) {
+ g_slist_free (accounts_list);
events_separator = dbusmenu_menuitem_new();
dbusmenu_menuitem_property_set(events_separator, DBUSMENU_MENUITEM_PROP_TYPE, DBUSMENU_CLIENT_TYPES_SEPARATOR);
dbusmenu_menuitem_child_add_position(root, events_separator, 2);