From b1140798c3b9d8fcfb7467108d411b7370ba1ec3 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 24 Jan 2008 12:43:12 +0000 Subject: ** Fixes bug #509124 2008-01-24 Matthew Barnes ** Fixes bug #509124 * composer/e-msg-composer.c (e_msg_composer_get_message_print), (e_msg_composer_get_message_draft): Check result of build_message() for NULL before proceeding. svn path=/trunk/; revision=34883 --- composer/ChangeLog | 8 ++++++++ composer/e-msg-composer.c | 11 +++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'composer') diff --git a/composer/ChangeLog b/composer/ChangeLog index 07a13f0104..e902007906 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,11 @@ +2008-01-24 Matthew Barnes + + ** Fixes bug #509124 + + * e-msg-composer.c (e_msg_composer_get_message_print), + (e_msg_composer_get_message_draft): + Check result of build_message() for NULL before proceeding. + 2008-01-14 Suman Manjunath ** Fix for bug #502783 diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index fccbf60e74..f0bb36633f 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -5276,6 +5276,9 @@ e_msg_composer_get_message_print (EMsgComposer *composer, gboolean save_html_obj GString *flags; msg = build_message (composer, save_html_object_data); + if (msg == NULL) + return NULL; + temp_composer = e_msg_composer_new_with_message (msg); camel_object_unref (msg); @@ -5302,8 +5305,10 @@ e_msg_composer_get_message_print (EMsgComposer *composer, gboolean save_html_obj temp_composer->priv->smime_encrypt = FALSE; msg = build_message (temp_composer, save_html_object_data); - camel_medium_set_header (CAMEL_MEDIUM (msg), - "X-Evolution-Format", flags->str); + if (msg != NULL) + camel_medium_set_header ( + CAMEL_MEDIUM (msg), + "X-Evolution-Format", flags->str); e_msg_composer_delete (temp_composer); g_string_free (flags, TRUE); @@ -5335,6 +5340,8 @@ e_msg_composer_get_message_draft (EMsgComposer *composer) p->smime_encrypt = FALSE; msg = build_message (composer, TRUE); + if (msg == NULL) + return NULL; p->send_html = old_send_html; p->pgp_sign = old_flags[0]; -- cgit