aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-06-15 17:37:10 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:42:28 +0800
commit57da003c4869b7f5be075caaa6133ce6e6dce42a (patch)
tree59541584eb0a509c962bff8cd56e5bea20cf1042 /calendar
parent8d1564b18de5c26d29596ab12e4e18663709f997 (diff)
downloadgsoc2013-evolution-57da003c4869b7f5be075caaa6133ce6e6dce42a.tar
gsoc2013-evolution-57da003c4869b7f5be075caaa6133ce6e6dce42a.tar.gz
gsoc2013-evolution-57da003c4869b7f5be075caaa6133ce6e6dce42a.tar.bz2
gsoc2013-evolution-57da003c4869b7f5be075caaa6133ce6e6dce42a.tar.lz
gsoc2013-evolution-57da003c4869b7f5be075caaa6133ce6e6dce42a.tar.xz
gsoc2013-evolution-57da003c4869b7f5be075caaa6133ce6e6dce42a.tar.zst
gsoc2013-evolution-57da003c4869b7f5be075caaa6133ce6e6dce42a.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