diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 7 | ||||
-rw-r--r-- | mail/em-format.c | 16 |
2 files changed, 17 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 4385a2db7a..9d7eddbd8b 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,8 @@ +2005-08-08 Vivek Jain <jvivek@novell.com> + + * em-format.c: (emf_multipart_appledouble): + check part before using it, else dump source + 2005-08-05 Not Zed <NotZed@Ximian.com> ** See bug #312397. @@ -161,7 +166,7 @@ * em-utils.[ch]: (em_utils_edit_filters) (emu_get_save_filesel) (em_utils_save_part) (em_utils_save_messages) Added code to handle save selected and save all options of the attachment bar. - + 2005-07-21 Not Zed <NotZed@Ximian.com> * em-folder-browser.c: reverted dobey's busted view->hide* menu diff --git a/mail/em-format.c b/mail/em-format.c index 10965148c0..61bd9551b6 100644 --- a/mail/em-format.c +++ b/mail/em-format.c @@ -1160,6 +1160,7 @@ static void emf_multipart_appledouble(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info) { CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part); + CamelMimePart *mime_part; int len; if (!CAMEL_IS_MULTIPART(mp)) { @@ -1167,11 +1168,16 @@ emf_multipart_appledouble(EMFormat *emf, CamelStream *stream, CamelMimePart *par return; } - /* try the data fork for something useful, doubtful but who knows */ - len = emf->part_id->len; - g_string_append_printf(emf->part_id, ".appledouble.1"); - em_format_part(emf, stream, camel_multipart_get_part(mp, 1)); - g_string_truncate(emf->part_id, len); + mime_part = camel_multipart_get_part(mp, 1); + if (mime_part) { + /* try the data fork for something useful, doubtful but who knows */ + len = emf->part_id->len; + g_string_append_printf(emf->part_id, ".appledouble.1"); + em_format_part(emf, stream, mime_part); + g_string_truncate(emf->part_id, len); + } else + em_format_format_source(emf, stream, part); + } /* RFC ??? */ |