From 51d32ea7bf60f234a68359a20b3fe74433e7ebcb Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sun, 22 Apr 2012 19:30:07 -0500 Subject: minor: silence two console warnings when the calendar app is disabled. --- src/datetime-service.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') 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)) { -- cgit v1.2.3