diff options
-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 5378011..11d231b 100644 --- a/src/datetime-service.c +++ b/src/datetime-service.c @@ -394,8 +394,10 @@ hide_all_appointments (void) int i; for (i=0; i<MAX_APPOINTMENT_MENUITEMS; i++) { - dbusmenu_menuitem_property_set_bool(appointments[i], DBUSMENU_MENUITEM_PROP_ENABLED, FALSE); - dbusmenu_menuitem_property_set_bool(appointments[i], DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE); + if (appointments[i]) { + dbusmenu_menuitem_property_set_bool(appointments[i], DBUSMENU_MENUITEM_PROP_ENABLED, FALSE); + dbusmenu_menuitem_property_set_bool(appointments[i], DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE); + } } } |