mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
minor fix on debug mode to prevent crashing
This commit is contained in:
parent
8a1e916bcc
commit
bcc5da75b6
1 changed files with 3 additions and 3 deletions
|
@ -567,13 +567,13 @@ NSString *NSStringForOWSMessageCellType(OWSMessageCellType cellType)
|
|||
TSAttachment *_Nullable linkPreviewAttachment =
|
||||
[TSAttachment fetchObjectWithUniqueID:message.linkPreview.imageAttachmentId transaction:transaction];
|
||||
if (!linkPreviewAttachment) {
|
||||
OWSFailDebug(@"Could not load link preview image attachment.");
|
||||
OWSLogDebug(@"Could not load link preview image attachment.");
|
||||
} else if (!linkPreviewAttachment.isImage) {
|
||||
OWSFailDebug(@"Link preview attachment isn't an image.");
|
||||
OWSLogDebug(@"Link preview attachment isn't an image.");
|
||||
} else if ([linkPreviewAttachment isKindOfClass:[TSAttachmentStream class]]) {
|
||||
TSAttachmentStream *attachmentStream = (TSAttachmentStream *)linkPreviewAttachment;
|
||||
if (!attachmentStream.isValidImage) {
|
||||
OWSFailDebug(@"Link preview image attachment isn't valid.");
|
||||
OWSLogDebug(@"Link preview image attachment isn't valid.");
|
||||
} else {
|
||||
self.linkPreviewAttachment = linkPreviewAttachment;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue