aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@canonical.com>2013-01-31 15:47:11 +0000
committerTarmac <Unknown>2013-01-31 15:47:11 +0000
commitd65d439d19fec49866f5903efd1e8f0b56d94c41 (patch)
tree1fb004dadbe2a3ebb7122aad13309fed94679a2a
parentd5d29b4a8a298ceb423bd117f1898ad399624279 (diff)
parent70ca00dc18369ae8183f9ce0c6fee1294944c1c4 (diff)
downloadayatana-indicator-datetime-d65d439d19fec49866f5903efd1e8f0b56d94c41.tar.gz
ayatana-indicator-datetime-d65d439d19fec49866f5903efd1e8f0b56d94c41.tar.bz2
ayatana-indicator-datetime-d65d439d19fec49866f5903efd1e8f0b56d94c41.zip
Check for NULL appointments in hide_all_appointments. Fixes: https://bugs.launchpad.net/bugs/1110398.
Approved by Mathieu Trudel-Lapierre, PS Jenkins bot.
-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);
+ }
}
}