Compare commits

...

1 Commits
4.x ... master

Author SHA1 Message Date
Anton 53837dc070 iOS 10 crash fix 2016-08-22 16:29:48 +03:00
1 changed files with 2 additions and 2 deletions

View File

@ -530,8 +530,8 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) {
for (NSURL *fileURL in fileEnumerator) {
NSDictionary *resourceValues = [fileURL resourceValuesForKeys:resourceKeys error:NULL];
// Skip directories.
if ([resourceValues[NSURLIsDirectoryKey] boolValue]) {
// Skip nil or directories.
if (!resourceValues || [resourceValues[NSURLIsDirectoryKey] boolValue]) {
continue;
}