Fix crash in ShareExtensionManager

Reported in Xcode organiser so there is no detail how it happened.
The fix is a workaround to avoid the crash but it does not help the user for sending their image.
This commit is contained in:
manuroe
2018-03-08 16:48:33 +01:00
parent 4690cf8179
commit 6c82e1ed7d
@@ -221,7 +221,15 @@ typedef NS_ENUM(NSInteger, ImageCompressionMode)
{
typeof(self) self = weakSelf;
itemProvider.isLoaded = YES;
[self.pendingImages addObject:imageData];
if (imageData)
{
[self.pendingImages addObject:imageData];
}
else
{
NSLog(@"[ShareExtensionManager] sendContentToRoom: failed to loadItemForTypeIdentifier. Error: %@", error);
}
if ([self areAttachmentsFullyLoaded])
{