From b98c75a30b40cc20452908803a6117916135d7a4 Mon Sep 17 00:00:00 2001 From: Tpphha Date: Mon, 26 Jun 2017 09:29:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20imageData=20=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E6=97=B6=E7=9A=84=E9=97=AA=E9=80=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 这里 imageData 是可能为空的,所以需要做保护。 --- QMUIKit/UIComponents/AssetLibrary/QMUIAsset.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/QMUIKit/UIComponents/AssetLibrary/QMUIAsset.m b/QMUIKit/UIComponents/AssetLibrary/QMUIAsset.m index b46e2ef9..7e4e06d7 100644 --- a/QMUIKit/UIComponents/AssetLibrary/QMUIAsset.m +++ b/QMUIKit/UIComponents/AssetLibrary/QMUIAsset.m @@ -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) {