diff options
author | Jeffrey Stedfast <fejj@helixcode.com> | 2000-10-18 09:09:45 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2000-10-18 09:09:45 +0800 |
commit | de8246dc8a906807234cab134e100abf64f2b1e0 (patch) | |
tree | 53ac35488805e155f6a916917221b11b243ae6ab | |
parent | 5543f7d8100d762958fde07967ca1b3e0616feb9 (diff) | |
download | gsoc2013-evolution-de8246dc8a906807234cab134e100abf64f2b1e0.tar.gz gsoc2013-evolution-de8246dc8a906807234cab134e100abf64f2b1e0.tar.zst gsoc2013-evolution-de8246dc8a906807234cab134e100abf64f2b1e0.zip |
If the body text was NULL, then don't bother turning it into HTML
2000-10-17 Jeffrey Stedfast <fejj@helixcode.com>
* e-msg-composer.c (e_msg_composer_new_with_message): If the body
text was NULL, then don't bother turning it into HTML (besides, it
causes a nasty segfault).
svn path=/trunk/; revision=5971
-rw-r--r-- | composer/ChangeLog | 6 | ||||
-rw-r--r-- | composer/e-msg-composer.c | 21 |
2 files changed, 17 insertions, 10 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index 670e2eb9c8..609d741da3 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,9 @@ +2000-10-17 Jeffrey Stedfast <fejj@helixcode.com> + + * e-msg-composer.c (e_msg_composer_new_with_message): If the body + text was NULL, then don't bother turning it into HTML (besides, it + causes a nasty segfault). + 2000-10-15 Dan Winship <danw@helixcode.com> * Makefile.am: Move CPPFLAGS flags to INCLUDES to avoid bashing diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 71a343b359..e05dc71103 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -1445,17 +1445,18 @@ e_msg_composer_new_with_message (CamelMimeMessage *msg) contents = camel_medium_get_content_object (CAMEL_MEDIUM (msg)); text = mail_get_message_body (contents, FALSE, &is_html); - if (is_html) - final_text = g_strdup (text); - else - final_text = e_text_to_html (text, E_TEXT_TO_HTML_CONVERT_NL | - E_TEXT_TO_HTML_CONVERT_SPACES); - g_free (text); - - e_msg_composer_set_body_text (new, final_text); + if (text) { + if (is_html) + final_text = g_strdup (text); + else + final_text = e_text_to_html (text, E_TEXT_TO_HTML_CONVERT_NL | + E_TEXT_TO_HTML_CONVERT_SPACES); + g_free (text); + + e_msg_composer_set_body_text (new, final_text); + } - /*set_editor_text (BONOBO_WIDGET (new->editor), - NULL, "FIXME: like, uh... put the message here and stuff\n");*/ + /* FIXME: attach the message attachments */ return new; } |