From 3fa50f34f7acc8df4440303c3cd87812336b80e2 Mon Sep 17 00:00:00 2001 From: Parthasarathi Susarla Date: Mon, 5 Dec 2005 08:31:03 +0000 Subject: ** See bug #322863 Check if the account indeed exists before 2005-12-05 Parthasarathi Susarla ** See bug #322863 * e-msg-composer.c: (e_msg_composer_new_with_message): Check if the account indeed exists before freeing/duping it. The account would typically not exist, when redirecting mails originated from other accounts which are not configured in ones machine. svn path=/trunk/; revision=30718 --- composer/ChangeLog | 9 +++++++++ composer/e-msg-composer.c | 6 ++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/composer/ChangeLog b/composer/ChangeLog index 146fe4cbbb..890e1029ec 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,12 @@ +2005-12-05 Parthasarathi Susarla + + ** See bug #322863 + * e-msg-composer.c: (e_msg_composer_new_with_message): + Check if the account indeed exists before freeing/duping it. + The account would typically not exist, when redirecting mails + originated from other accounts which are not configured in ones + machine. + 2005-11-26 Tor Lillqvist * e-msg-composer-attachment.c: Include e-util-private.h to get diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 52ef59a2da..ae263cc9ba 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -4366,8 +4366,10 @@ e_msg_composer_new_with_message (CamelMimeMessage *message) if ((account = mail_config_get_account_by_uid(account_name)) == NULL) /* 'old' setting */ account = mail_config_get_account_by_name(account_name); - g_free (account_name); - account_name = g_strdup (account->name); + if (account) { + g_free (account_name); + account_name = g_strdup (account->name); + } } if (postto == NULL) { -- cgit v1.2.3