aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2015-07-22 16:00:57 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2015-07-22 16:00:57 +0200
commitac4bbf0cd034353b8f907a83c573e42abd47aebc (patch)
treef3dd591ea554776c1ec49ce9e3a52100f5e2c159 /src
parent6f2f647ecf850692aea054633ceed92fc48bbf93 (diff)
downloadayatana-ido-ac4bbf0cd034353b8f907a83c573e42abd47aebc.tar.gz
ayatana-ido-ac4bbf0cd034353b8f907a83c573e42abd47aebc.tar.bz2
ayatana-ido-ac4bbf0cd034353b8f907a83c573e42abd47aebc.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.
Diffstat (limited to 'src')
-rw-r--r--src/idocalendarmenuitem.c2
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;