fix crash of copy image

This commit is contained in:
Danmei Chen 2019-01-17 17:03:08 +01:00
parent 896165ae06
commit 8d2ea39119

View file

@ -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");