Fix #1619 iOS10 Crash issue

This commit is contained in:
Bogdan Poplauschi 2016-10-01 12:13:31 +03:00
parent 8382899070
commit 7940577b12
1 changed files with 1 additions and 1 deletions

View File

@ -508,7 +508,7 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) {
NSDictionary<NSString *, id> *resourceValues = [fileURL resourceValuesForKeys:resourceKeys error:&error];
// Skip directories and errors.
if (error || [resourceValues[NSURLIsDirectoryKey] boolValue]) {
if (error || !resourceValues || [resourceValues[NSURLIsDirectoryKey] boolValue]) {
continue;
}