Add some sanity check on the URL parameter
This commit is contained in:
parent
4284b5797e
commit
ddd03f7d2c
|
@ -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]))
|
||||
|
|
Loading…
Reference in New Issue