aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-msg-composer.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-10-18 09:09:45 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-10-18 09:09:45 +0800
commitde8246dc8a906807234cab134e100abf64f2b1e0 (patch)
tree53ac35488805e155f6a916917221b11b243ae6ab /composer/e-msg-composer.c
parent5543f7d8100d762958fde07967ca1b3e0616feb9 (diff)
downloadgsoc2013-evolution-de8246dc8a906807234cab134e100abf64f2b1e0.tar
gsoc2013-evolution-de8246dc8a906807234cab134e100abf64f2b1e0.tar.gz
gsoc2013-evolution-de8246dc8a906807234cab134e100abf64f2b1e0.tar.bz2
gsoc2013-evolution-de8246dc8a906807234cab134e100abf64f2b1e0.tar.lz
gsoc2013-evolution-de8246dc8a906807234cab134e100abf64f2b1e0.tar.xz
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
Diffstat (limited to 'composer/e-msg-composer.c')
-rw-r--r--composer/e-msg-composer.c21
1 files changed, 11 insertions, 10 deletions
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;
}