Skip to content

Commit

Permalink
(fix) handle empty body data correctly (fixes #3581)
Browse files Browse the repository at this point in the history
  • Loading branch information
extrafu committed Mar 18, 2016
1 parent a87c276 commit f16cc60
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion SoObjects/Mailer/SOGoDraftObject.m
Expand Up @@ -844,7 +844,10 @@ - (NSArray *) _attachmentBodiesFromPaths: (NSArray *) paths
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;
Expand Down

0 comments on commit f16cc60

Please sign in to comment.