diff --git a/SDWebImage/SDWebImageManager.m b/SDWebImage/SDWebImageManager.m index cb38493b..ca86f768 100644 --- a/SDWebImage/SDWebImageManager.m +++ b/SDWebImage/SDWebImageManager.m @@ -69,6 +69,12 @@ url = [NSURL URLWithString:(NSString *)url]; } + // Prevents app crashing on argument type error like sending NSNull instead of NSURL + if (![url isKindOfClass:NSURL.class]) + { + url = nil; + } + __block SDWebImageCombinedOperation *operation = SDWebImageCombinedOperation.new; if (!url || !completedBlock || (!(options & SDWebImageRetryFailed) && [self.failedURLs containsObject:url]))