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

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Christopher Townsend
Approved revision: 193
Merged at revision: 193
Proposed branch: lp:~3v1n0/ido/protect-keypress-cb
Merge into: lp:ido/15.10
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
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Christopher Townsend Approve
Review via email: mp+265534@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.

To post a comment you must log in.
Revision history for this message
Christopher Townsend (townsend) wrote :

LGTM

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

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-07-22 14:02:33 +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