aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-format.c
diff options
context:
space:
mode:
authorVivek Jain <jvivek@novell.com>2005-08-08 15:05:19 +0800
committerJain Vivek <jvivek@src.gnome.org>2005-08-08 15:05:19 +0800
commitb2f1b4ff38862045dc318413a2d179554a494b99 (patch)
tree63bc6ac66e18107858f2badd1012ab7fa4756adb /mail/em-format.c
parent2a97c03e3b4238a920e79333e6d74a5fec8e1a87 (diff)
downloadgsoc2013-evolution-b2f1b4ff38862045dc318413a2d179554a494b99.tar.gz
gsoc2013-evolution-b2f1b4ff38862045dc318413a2d179554a494b99.tar.zst
gsoc2013-evolution-b2f1b4ff38862045dc318413a2d179554a494b99.zip
check part before using it, else dump source
2005-08-08 Vivek Jain <jvivek@novell.com> * em-format.c: (emf_multipart_appledouble): check part before using it, else dump source svn path=/trunk/; revision=30031
Diffstat (limited to 'mail/em-format.c')
-rw-r--r--mail/em-format.c16
1 files changed, 11 insertions, 5 deletions
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 ??? */