Merge lp:~3v1n0/ido/protect-keypress-cb-trusty into lp:ido/14.04

Proposed by Marco Trevisan (Treviño) on 2015-10-15
Status: Merged
Approved by: Andrea Azzarone on 2015-10-15
Approved revision: 185
Merged at revision: 185
Proposed branch: lp:~3v1n0/ido/protect-keypress-cb-trusty
Merge into: lp:ido/14.04
Diff against target: 12 lines (+2/-0)
1 file modified
src/idocalendarmenuitem.c (+2/-0)
To merge this branch: bzr merge lp:~3v1n0/ido/protect-keypress-cb-trusty
Reviewer Review Type Date Requested Status
Andrea Azzarone (community) 2015-10-15 Approve on 2015-10-15
Review via email: mp+274538@code.launchpad.net

Commit message

IdoCalendarMenuItem: add crash guard on ido_calendar_menu_item_key_press

It's quite weird that data is NULL at this point (considering how the callback is
initialized), but it does happen, so it's just better to warn here instead of crashing.

Description of the change

To post a comment you must log in.
185. By Marco Trevisan (Treviño) on 2015-10-15

IdoCalendarMenuItem: add crash guard on ido_calendar_menu_item_key_press

It's quite weird that data is NULL at this point (considering how the callback is
initialized), but it does happen, so it's just better to warn here instead of crashing.

Andrea Azzarone (azzar1) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/idocalendarmenuitem.c'
2--- src/idocalendarmenuitem.c 2013-11-26 18:52:21 +0000
3+++ src/idocalendarmenuitem.c 2015-10-15 11:24:11 +0000
4@@ -156,6 +156,8 @@
5 {
6 IdoCalendarMenuItem *menuitem = (IdoCalendarMenuItem *)data;
7
8+ g_return_val_if_fail (IDO_IS_CALENDAR_MENU_ITEM (menuitem), FALSE);
9+
10 if (menuitem->priv->selected)
11 {
12 GtkWidget *calendar = menuitem->priv->calendar;

Subscribers

People subscribed via source and target branches