Fix for local image URLs

This commit is contained in:
Connor Montgomery
2015-11-09 11:52:44 -05:00
parent 5702efdb64
commit dbf05ce687
2 changed files with 3 additions and 2 deletions

View File

@@ -102,7 +102,8 @@
[self lock];
dispatch_queue_t delegateQueue = self.delegateQueues[@(task.taskIdentifier)];
[self unlock];
if ([(NSHTTPURLResponse *)task.response statusCode] == 404 && !error) {
NSHTTPURLResponse *response = (NSHTTPURLResponse *)task.response;
if ([response respondsToSelector:@selector(statusCode)] && [response statusCode] == 404 && !error) {
error = [NSError errorWithDomain:NSURLErrorDomain
code:NSURLErrorRedirectToNonExistentLocation
userInfo:@{NSLocalizedDescriptionKey : @"The requested URL was not found on this server."}];