aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog6
-rw-r--r--composer/e-msg-composer.c21
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;
}