From 8d2ea39119f612ef63649dfb43838e45e7eb6af9 Mon Sep 17 00:00:00 2001 From: Danmei Chen Date: Thu, 17 Jan 2019 17:03:08 +0100 Subject: [PATCH] fix crash of copy image --- Classes/LinphoneUI/UIChatBubblePhotoCell.m | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Classes/LinphoneUI/UIChatBubblePhotoCell.m b/Classes/LinphoneUI/UIChatBubblePhotoCell.m index 6f6476337..183cb749d 100644 --- a/Classes/LinphoneUI/UIChatBubblePhotoCell.m +++ b/Classes/LinphoneUI/UIChatBubblePhotoCell.m @@ -121,9 +121,8 @@ static const CGFloat CELL_IMAGE_X_MARGIN = 100; resultHandler:^(UIImage *image, NSDictionary * info) { if (image) { imageSize = [UIChatBubbleTextCell getMediaMessageSizefromOriginalSize:[image size] withWidth:chatTableView.tableView.frame.size.width - CELL_IMAGE_X_MARGIN]; - UIImage *newImage = [UIImage UIImageResize:image toSize:imageSize]; - [chatTableView.imagesInChatroom setObject:newImage forKey:[asset localIdentifier]]; - [self loadImageAsset:asset image:newImage]; + [chatTableView.imagesInChatroom setObject:image forKey:[asset localIdentifier]]; + [self loadImageAsset:asset image:image]; } else { LOGE(@"Can't read image");