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

This commit is contained in:
Ludovic Marcotte
2016-03-18 12:54:00 -04:00
parent f08c718c00
commit 638dbc904c
+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;