aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 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);
+ }
}
}