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

This commit is contained in:
Ludovic Marcotte
2016-03-18 12:54:00 -04:00
parent a87c276b6b
commit f16cc609ea

View File

@@ -844,7 +844,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;