X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-formatter.c;h=ed1022224ba5fa22dcbbf4f268856f54c7c5cd17;hp=4e1e367961c148ad2a246010e82d5644a581ef8b;hb=f02807b9ef9bdaa0291310798541fefadbb13227;hpb=3b214150a992267f0722e89c94759f8e3c637c0a diff --git a/src/modest-formatter.c b/src/modest-formatter.c index 4e1e367..ed10222 100644 --- a/src/modest-formatter.c +++ b/src/modest-formatter.c @@ -114,7 +114,7 @@ construct_from_text (TnyMimePart *part, /* Construct MIME part */ tny_stream_reset (text_body_stream); - tny_mime_part_construct_from_stream (part, text_body_stream, content_type); + tny_mime_part_construct (part, text_body_stream, content_type, "7bit"); tny_stream_reset (text_body_stream); /* Clean */ @@ -189,8 +189,10 @@ modest_formatter_attach (ModestFormatter *self, TnyMsg *msg, TnyHeader *header) construct_from_text (body_part, "", priv->content_type); g_object_unref (body_part); - /* Add parts */ - tny_mime_part_add_part (TNY_MIME_PART (new_msg), TNY_MIME_PART (msg)); + if (msg) { + /* Add parts */ + tny_mime_part_add_part (TNY_MIME_PART (new_msg), TNY_MIME_PART (msg)); + } return new_msg; }