Merge pull request #885 from DevilDimon/dock_string_crash_fix
Ignore non-URL strings when opening URLs
This commit is contained in:
commit
cd2587a435
|
@ -1269,8 +1269,15 @@ static void removeKeRangerRansomware()
|
|||
else
|
||||
urlString = [@"http://" stringByAppendingString: urlString];
|
||||
}
|
||||
|
||||
NSURL * url = [NSURL URLWithString: urlString];
|
||||
if (url == nil)
|
||||
{
|
||||
NSLog(@"Detected non-URL string \"%@\". Ignoring.", urlString);
|
||||
return;
|
||||
}
|
||||
|
||||
NSURLRequest * request = [NSURLRequest requestWithURL: [NSURL URLWithString: urlString]
|
||||
NSURLRequest * request = [NSURLRequest requestWithURL: url
|
||||
cachePolicy: NSURLRequestReloadIgnoringLocalAndRemoteCacheData timeoutInterval: 60];
|
||||
|
||||
if (fPendingTorrentDownloads[[request URL]])
|
||||
|
|
Loading…
Reference in New Issue