Ignore non-URL strings when opening URLs

This commit is contained in:
Dmitry Serov 2019-04-19 02:28:45 +07:00
parent 750589101a
commit 4331d9f0c7
1 changed files with 7 additions and 1 deletions

View File

@ -1270,7 +1270,13 @@ static void removeKeRangerRansomware()
urlString = [@"http://" stringByAppendingString: urlString];
}
NSURLRequest * request = [NSURLRequest requestWithURL: [NSURL URLWithString: urlString]
NSURL * url = [NSURL URLWithString: urlString];
if (url == nil)
{
return;
}
NSURLRequest * request = [NSURLRequest requestWithURL: url
cachePolicy: NSURLRequestReloadIgnoringLocalAndRemoteCacheData timeoutInterval: 60];
if (fPendingTorrentDownloads[[request URL]])