aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-04-23 13:20:03 -0500
committerCharles Kerr <charles.kerr@canonical.com>2012-04-23 13:20:03 -0500
commit2ec7b1e0d6fcc25e0570512757a7298ec7d6e806 (patch)
tree97f1fcd971768e110e117e21c5ded7be08cc0b35
parentd3b9fd16b24968091dccd52eb824c213a8b819d3 (diff)
parent51d32ea7bf60f234a68359a20b3fe74433e7ebcb (diff)
downloadayatana-indicator-datetime-2ec7b1e0d6fcc25e0570512757a7298ec7d6e806.tar.gz
ayatana-indicator-datetime-2ec7b1e0d6fcc25e0570512757a7298ec7d6e806.tar.bz2
ayatana-indicator-datetime-2ec7b1e0d6fcc25e0570512757a7298ec7d6e806.zip
merge lp:~charlesk/indicator-datetime/shush to silence a couple of console warnings when the calendar app is disabled.
-rw-r--r--src/datetime-service.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c
index 8ecef1c..c2a4c27 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -579,8 +579,10 @@ check_for_calendar (gpointer user_data)
g_signal_connect(calendar, "event::day-selected-double-click", G_CALLBACK(day_selected_double_click_cb), NULL);
} else {
g_debug("Unable to find calendar app.");
- dbusmenu_menuitem_property_set_bool(add_appointment, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
- dbusmenu_menuitem_property_set_bool(events_separator, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
+ if (add_appointment != NULL)
+ dbusmenu_menuitem_property_set_bool(add_appointment, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
+ if (events_separator != NULL)
+ dbusmenu_menuitem_property_set_bool(events_separator, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
}
if (g_settings_get_boolean(conf, SETTINGS_SHOW_CALENDAR_S)) {