Commit 3416b8a462bb1296925558ea47941823210526cc
1 parent
693d066b
提交0.0.19
Showing
2 changed files
with
8 additions
and
4 deletions
CNLiveImagePickerController.podspec
CNLiveImagePickerController/Classes/CNEditVideoController.m
| ... | ... | @@ -972,14 +972,18 @@ static const char _CNOperationCellKey; |
| 972 | 972 | if (!error && cgImg) { |
| 973 | 973 | UIImage *image = [UIImage imageWithCGImage:cgImg]; |
| 974 | 974 | CGImageRelease(cgImg); |
| 975 | - | |
| 976 | - [_imageCache setValue:image forKey:@(row).stringValue]; | |
| 975 | + if (image) { | |
| 976 | + [_imageCache setValue:image forKey:@(row).stringValue]; | |
| 977 | + } | |
| 977 | 978 | |
| 978 | 979 | dispatch_async(dispatch_get_main_queue(), ^{ |
| 979 | 980 | |
| 980 | 981 | NSIndexPath *nowIndexPath = [collectionView indexPathForCell:cell]; |
| 981 | 982 | if (row == nowIndexPath.row) { |
| 982 | - [(CNEditVideoCell *)cell imageView].image = image; | |
| 983 | + if (image) { | |
| 984 | + [(CNEditVideoCell *)cell imageView].image = image; | |
| 985 | + } | |
| 986 | + | |
| 983 | 987 | } else { |
| 984 | 988 | UIImage *cacheImage = _imageCache[@(nowIndexPath.row).stringValue]; |
| 985 | 989 | if (cacheImage) { | ... | ... |