Fix #1619 iOS10 Crash issue
Showing
1 changed file
with
1 additions
and
1 deletions
@@ -508,7 +508,7 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) { | @@ -508,7 +508,7 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) { | ||
508 | NSDictionary<NSString *, id> *resourceValues = [fileURL resourceValuesForKeys:resourceKeys error:&error]; | 508 | NSDictionary<NSString *, id> *resourceValues = [fileURL resourceValuesForKeys:resourceKeys error:&error]; |
509 | 509 | ||
510 | // Skip directories and errors. | 510 | // Skip directories and errors. |
511 | - if (error || [resourceValues[NSURLIsDirectoryKey] boolValue]) { | 511 | + if (error || !resourceValues || [resourceValues[NSURLIsDirectoryKey] boolValue]) { |
512 | continue; | 512 | continue; |
513 | } | 513 | } |
514 | 514 |
-
Please register or login to post a comment