Commit 3416b8a462bb1296925558ea47941823210526cc

Authored by 梁星国
1 parent 693d066b

提交0.0.19

CNLiveImagePickerController.podspec
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 8
9 Pod::Spec.new do |s| 9 Pod::Spec.new do |s|
10 s.name = 'CNLiveImagePickerController' 10 s.name = 'CNLiveImagePickerController'
11 - s.version = '0.0.18' 11 + s.version = '0.0.19'
12 s.summary = '相册' 12 s.summary = '相册'
13 13
14 # This description is used to generate tags and improve search results. 14 # This description is used to generate tags and improve search results.
CNLiveImagePickerController/Classes/CNEditVideoController.m
@@ -972,14 +972,18 @@ static const char _CNOperationCellKey; @@ -972,14 +972,18 @@ static const char _CNOperationCellKey;
972 if (!error && cgImg) { 972 if (!error && cgImg) {
973 UIImage *image = [UIImage imageWithCGImage:cgImg]; 973 UIImage *image = [UIImage imageWithCGImage:cgImg];
974 CGImageRelease(cgImg); 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 dispatch_async(dispatch_get_main_queue(), ^{ 979 dispatch_async(dispatch_get_main_queue(), ^{
979 980
980 NSIndexPath *nowIndexPath = [collectionView indexPathForCell:cell]; 981 NSIndexPath *nowIndexPath = [collectionView indexPathForCell:cell];
981 if (row == nowIndexPath.row) { 982 if (row == nowIndexPath.row) {
982 - [(CNEditVideoCell *)cell imageView].image = image; 983 + if (image) {
  984 + [(CNEditVideoCell *)cell imageView].image = image;
  985 + }
  986 +
983 } else { 987 } else {
984 UIImage *cacheImage = _imageCache[@(nowIndexPath.row).stringValue]; 988 UIImage *cacheImage = _imageCache[@(nowIndexPath.row).stringValue];
985 if (cacheImage) { 989 if (cacheImage) {