(fix) handle empty body data correctly (fixes #3581)

This commit is contained in:
Ludovic Marcotte committed 2016-03-18 12:54:50 -04:00
1 parent f08c718c00
commit 638dbc904c
1 file changed
+4 -1
+4 -1
View File
@@ -832,7 +832,10 @@ 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 data]];
}
return bodies;