diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2012-04-22 19:30:07 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2012-04-22 19:30:07 -0500 |
commit | 51d32ea7bf60f234a68359a20b3fe74433e7ebcb (patch) | |
tree | 37eba3f6875d48bb01b3eb8e3d69db3e16c1977d | |
parent | 5a12bc3c3f41d17934c0773c2214ac6097a9154f (diff) | |
download | ayatana-indicator-datetime-51d32ea7bf60f234a68359a20b3fe74433e7ebcb.tar.gz ayatana-indicator-datetime-51d32ea7bf60f234a68359a20b3fe74433e7ebcb.tar.bz2 ayatana-indicator-datetime-51d32ea7bf60f234a68359a20b3fe74433e7ebcb.zip |
minor: silence two console warnings when the calendar app is disabled.
-rw-r--r-- | src/datetime-service.c | 6 |
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)) { |