Skip to content

Commit

Permalink
修复 imageData 为空时的闪退
Browse files Browse the repository at this point in the history
这里 imageData 是可能为空的,所以需要做保护。
  • Loading branch information
wanhmr committed Jun 26, 2017
1 parent f2111a5 commit b98c75a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion QMUIKit/UIComponents/AssetLibrary/QMUIAsset.m
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,9 @@ - (void)requestImagePhAssetInfo:(void (^)(NSDictionary *))completion synchronous
[[[QMUIAssetsManager sharedInstance] phCachingImageManager] requestImageDataForAsset:_phAsset options:imageRequestOptions resultHandler:^(NSData *imageData, NSString *dataUTI, UIImageOrientation orientation, NSDictionary *info) {
if (info) {
NSMutableDictionary *tempInfo = [[NSMutableDictionary alloc] init];
[tempInfo setObject:imageData forKey:kAssetInfoImageData];
if (imageData) {
[tempInfo setObject:imageData forKey:kAssetInfoImageData];
}

[tempInfo setObject:info forKey:kAssetInfoOriginInfo];
if (dataUTI) {
Expand Down

0 comments on commit b98c75a

Please sign in to comment.