X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmodest-formatter.c;h=ddbd2e59edb6ac80d7d233c15bd52afcb2fc8375;hb=5adec85dc2cc832e68463e97a534a913165f6587;hp=7a2332911872b7207a7dd75f47889ec1cc773cb2;hpb=b09daad954384d34091b51a04eda7fd3a57a5f22;p=modest diff --git a/src/modest-formatter.c b/src/modest-formatter.c index 7a23329..ddbd2e5 100644 --- a/src/modest-formatter.c +++ b/src/modest-formatter.c @@ -27,7 +27,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include #include @@ -125,7 +124,7 @@ modest_formatter_do (ModestFormatter *self, TnyHeader *header, FormatterFunc func) { - TnyMsg *new_msg; + TnyMsg *new_msg = NULL; gchar *body_text = NULL, *txt = NULL; ModestFormatterPrivate *priv; TnyPlatformFactory *fact; @@ -173,6 +172,7 @@ modest_formatter_attach (ModestFormatter *self, TnyMimePart *body, TnyHeader *he { TnyMsg *new_msg = NULL; gchar *attach_text = NULL; + const gchar *subject; TnyMimePart *body_part = NULL, *attach_part = NULL; ModestFormatterPrivate *priv; TnyPlatformFactory *fact; @@ -188,7 +188,8 @@ modest_formatter_attach (ModestFormatter *self, TnyMimePart *body, TnyHeader *he attach_text = extract_text (self, body); construct_from_text (body_part, "", priv->content_type); construct_from_text (attach_part, (const gchar*) attach_text, priv->content_type); - tny_mime_part_set_filename (attach_part, tny_header_get_subject (header)); + subject = tny_header_get_subject (header); + tny_mime_part_set_filename (attach_part, subject ? subject : _("No subject")); /* Add parts */ tny_mime_part_add_part (TNY_MIME_PART (new_msg), body_part);