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

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Andrea Azzarone
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) Approve
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)

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.

Revision history for this message
Andrea Azzarone (azzar1) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/idocalendarmenuitem.c'
--- src/idocalendarmenuitem.c 2013-11-26 18:52:21 +0000
+++ src/idocalendarmenuitem.c 2015-10-15 11:24:11 +0000
@@ -156,6 +156,8 @@
156{156{
157 IdoCalendarMenuItem *menuitem = (IdoCalendarMenuItem *)data;157 IdoCalendarMenuItem *menuitem = (IdoCalendarMenuItem *)data;
158158
159 g_return_val_if_fail (IDO_IS_CALENDAR_MENU_ITEM (menuitem), FALSE);
160
159 if (menuitem->priv->selected)161 if (menuitem->priv->selected)
160 {162 {
161 GtkWidget *calendar = menuitem->priv->calendar;163 GtkWidget *calendar = menuitem->priv->calendar;

Subscribers

People subscribed via source and target branches