From 359965e827f56eb95c919cc62f58e9637be55495 Mon Sep 17 00:00:00 2001
From: root <root@poldi2.hopto.org>
Date: Thu, 17 Mar 2016 10:58:41 +0100
Subject: [PATCH 18/18] 3581

---
 SoObjects/Mailer/SOGoDraftObject.m | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/SoObjects/Mailer/SOGoDraftObject.m b/SoObjects/Mailer/SOGoDraftObject.m
index 4fadcea..bcc5757 100644
--- a/SoObjects/Mailer/SOGoDraftObject.m
+++ b/SoObjects/Mailer/SOGoDraftObject.m
@@ -844,7 +844,11 @@ static NSString    *userAgent      = nil;
   while ((currentKey = [attachmentKeys nextObject]))
     {
       body = [fetch objectForKey: [currentKey lowercaseString]];
-      [bodies addObject: [body objectForKey: @"data"]];
+
+      if (body)
+        [bodies addObject: [body objectForKey: @"data"]];
+      else
+        [bodies addObject: [[[NSData alloc] init] autorelease]];
     }
 
   return bodies;
-- 
2.1.4

