Merge lp:~cjwatson/indicator-datetime/careful-hide-appointments into lp:indicator-datetime/13.04

Proposed by Colin Watson
Status: Merged
Approved by: Mathieu Trudel-Lapierre
Approved revision: 203
Merged at revision: 203
Proposed branch: lp:~cjwatson/indicator-datetime/careful-hide-appointments
Merge into: lp:indicator-datetime/13.04
Diff against target: 15 lines (+4/-2)
1 file modified
src/datetime-service.c (+4/-2)
To merge this branch: bzr merge lp:~cjwatson/indicator-datetime/careful-hide-appointments
Reviewer Review Type Date Requested Status
Mathieu Trudel-Lapierre Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+145599@code.launchpad.net

Commit message

Check for NULL appointments in hide_all_appointments.

Description of the change

To suppress the criticals reported in bug 1110398, check for NULL appointments in hide_all_appointments.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Seems reasonable. The rest of the code should probably be fixed to avoid adding so many NULLs unnecessarily, but this will do for now.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/datetime-service.c'
2--- src/datetime-service.c 2013-01-17 21:17:40 +0000
3+++ src/datetime-service.c 2013-01-30 13:20:30 +0000
4@@ -394,8 +394,10 @@
5 int i;
6
7 for (i=0; i<MAX_APPOINTMENT_MENUITEMS; i++) {
8- dbusmenu_menuitem_property_set_bool(appointments[i], DBUSMENU_MENUITEM_PROP_ENABLED, FALSE);
9- dbusmenu_menuitem_property_set_bool(appointments[i], DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
10+ if (appointments[i]) {
11+ dbusmenu_menuitem_property_set_bool(appointments[i], DBUSMENU_MENUITEM_PROP_ENABLED, FALSE);
12+ dbusmenu_menuitem_property_set_bool(appointments[i], DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
13+ }
14 }
15 }
16

Subscribers

People subscribed via source and target branches