diff options
author | Marco Trevisan (TreviƱo) <mail@3v1n0.net> | 2015-07-28 21:12:24 +0000 |
---|---|---|
committer | CI Train Bot <ci-train-bot@canonical.com> | 2015-07-28 21:12:24 +0000 |
commit | 03583381e95d3430f8139ec6c573ee4c7bacf0cb (patch) | |
tree | f3dd591ea554776c1ec49ce9e3a52100f5e2c159 | |
parent | 6f2f647ecf850692aea054633ceed92fc48bbf93 (diff) | |
parent | ac4bbf0cd034353b8f907a83c573e42abd47aebc (diff) | |
download | ayatana-ido-03583381e95d3430f8139ec6c573ee4c7bacf0cb.tar.gz ayatana-ido-03583381e95d3430f8139ec6c573ee4c7bacf0cb.tar.bz2 ayatana-ido-03583381e95d3430f8139ec6c573ee4c7bacf0cb.zip |
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. Fixes: #1350821
Approved by: PS Jenkins bot, Christopher Townsend
-rw-r--r-- | src/idocalendarmenuitem.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/idocalendarmenuitem.c b/src/idocalendarmenuitem.c index 65dac7f..7c20baf 100644 --- a/src/idocalendarmenuitem.c +++ b/src/idocalendarmenuitem.c @@ -156,6 +156,8 @@ ido_calendar_menu_item_key_press (GtkWidget *widget, { IdoCalendarMenuItem *menuitem = (IdoCalendarMenuItem *)data; + g_return_val_if_fail (IDO_IS_CALENDAR_MENU_ITEM (menuitem), FALSE); + if (menuitem->priv->selected) { GtkWidget *calendar = menuitem->priv->calendar; |