aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-06-15 17:37:10 +0800
committerMilan Crha <mcrha@redhat.com>2011-06-15 17:37:10 +0800
commite4b480c8d791a368b72010f978696998bba75e5d (patch)
treef624e869cadffd72fdf31772414a300929344009 /calendar
parentbee278ea7ca2b72577d003bf212400fbe17a7744 (diff)
downloadgsoc2013-evolution-e4b480c8d791a368b72010f978696998bba75e5d.tar.gz
gsoc2013-evolution-e4b480c8d791a368b72010f978696998bba75e5d.tar.zst
gsoc2013-evolution-e4b480c8d791a368b72010f978696998bba75e5d.zip
Bug #652620 - Can use uninitialized memory in alarm-notification-dialog
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/alarm-notify/alarm-notify-dialog.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.c b/calendar/gui/alarm-notify/alarm-notify-dialog.c
index eac9424de3..e409432d3f 100644
--- a/calendar/gui/alarm-notify/alarm-notify-dialog.c
+++ b/calendar/gui/alarm-notify/alarm-notify-dialog.c
@@ -144,18 +144,20 @@ dialog_response_cb (GtkDialog *dialog, guint response_id, gpointer user_data)
if (!funcinfo) {
GtkTreeModel *treemodel = gtk_tree_view_get_model (GTK_TREE_VIEW (an->treeview));
- gtk_tree_model_get_iter_first (treemodel, &iter);
+ if (!gtk_tree_model_get_iter_first (treemodel, &iter))
+ return;
+
gtk_tree_model_get (treemodel, &iter, ALARM_FUNCINFO_COLUMN, &funcinfo, -1);
}
+
g_return_if_fail (funcinfo);
+
switch (response_id) {
case GTK_RESPONSE_CLOSE:
case GTK_RESPONSE_DELETE_EVENT:
(* funcinfo->func) (ALARM_NOTIFY_CLOSE, -1, funcinfo->func_data);
break;
}
-
- return;
}
static void