From ef5119f76599f6a11a75175726f055982fa63d83 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 15 Oct 2012 08:04:26 -0400 Subject: [PATCH] crash: do not attempt to store nil body part keys, for emails having no text body --- OpenChange/MAPIStoreMailFolder.m | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/OpenChange/MAPIStoreMailFolder.m b/OpenChange/MAPIStoreMailFolder.m index b03ea4bd8..9271751a2 100644 --- a/OpenChange/MAPIStoreMailFolder.m +++ b/OpenChange/MAPIStoreMailFolder.m @@ -1281,9 +1281,12 @@ _parseCOPYUID (NSString *line, NSArray **destUIDsP) if (message) { bodyPartKey = [message bodyContentPartKey]; - [bodyPartKeys addObject: bodyPartKey]; - messageUid = [self messageUIDFromMessageKey: messageKey]; - [keyAssoc setObject: bodyPartKey forKey: messageUid]; + if (bodyPartKey) + { + [bodyPartKeys addObject: bodyPartKey]; + messageUid = [self messageUIDFromMessageKey: messageKey]; + [keyAssoc setObject: bodyPartKey forKey: messageUid]; + } } }