diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewItem.m b/Signal/src/ViewControllers/ConversationView/ConversationViewItem.m index cb05b04a3..2eb633997 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewItem.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewItem.m @@ -481,6 +481,12 @@ NSString *NSStringForOWSMessageCellType(OWSMessageCellType cellType) } else if ([self.attachmentStream isAnimated] || [self.attachmentStream isImage] || [self.attachmentStream isVideo]) { if ([self.attachmentStream isAnimated]) { + if (![self.attachmentStream isValidImage]) { + DDLogWarn(@"Treating invalid image as generic attachment."); + self.messageCellType = OWSMessageCellType_GenericAttachment; + return; + } + self.messageCellType = OWSMessageCellType_AnimatedImage; } else if ([self.attachmentStream isImage]) { if (![self.attachmentStream isValidImage]) {