aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-12-23 00:05:44 +0800
committerMilan Crha <mcrha@redhat.com>2011-12-23 00:05:44 +0800
commit8ad132c58be4ed401450d79f9d0cc3511d61f210 (patch)
tree1864e1409ab6ad4d549416bf1ef7714a3235b9eb
parent0cd98f1a85724293e2583180b8d8dc4b2284647f (diff)
downloadgsoc2013-evolution-8ad132c58be4ed401450d79f9d0cc3511d61f210.tar.gz
gsoc2013-evolution-8ad132c58be4ed401450d79f9d0cc3511d61f210.tar.zst
gsoc2013-evolution-8ad132c58be4ed401450d79f9d0cc3511d61f210.zip
Bug #666490 - Crash in e-mail-session.c:user_message_response
-rw-r--r--mail/e-mail-session.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/mail/e-mail-session.c b/mail/e-mail-session.c
index 3fb1cb6418..9ac0cad048 100644
--- a/mail/e-mail-session.c
+++ b/mail/e-mail-session.c
@@ -170,9 +170,10 @@ static void user_message_exec (struct _user_message_msg *m,
static void
user_message_response_free (GtkDialog *dialog,
- gint button,
- struct _user_message_msg *m)
+ gint button)
{
+ struct _user_message_msg *m = NULL;
+
gtk_widget_destroy ((GtkWidget *) dialog);
user_message_dialog = NULL;
@@ -194,13 +195,13 @@ user_message_response (GtkDialog *dialog,
gint button,
struct _user_message_msg *m)
{
- /* if !allow_cancel, then we've already replied */
- if (m->button_captions) {
+ /* if !m or !button_captions, then we've already replied */
+ if (m && m->button_captions) {
m->result = button;
e_flag_set (m->done);
}
- user_message_response_free (dialog, button, m);
+ user_message_response_free (dialog, button);
}
static void
@@ -269,7 +270,7 @@ user_message_exec (struct _user_message_msg *m,
} else {
g_signal_connect (
user_message_dialog, "response",
- G_CALLBACK (user_message_response), m);
+ G_CALLBACK (user_message_response), NULL);
gtk_widget_show (user_message_dialog);
}
}