Merge pull request #4365 from ddawson/ext-tor-nullptr

Fix NullPointerException with external tor usage
This commit is contained in:
Christoph Atteneder 2020-07-23 16:09:02 +02:00 committed by GitHub
commit efe346a4ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,7 @@ public class RunningTor extends TorMode {
Tor result;
if (!password.isEmpty())
result = new ExternalTor(controlPort, password);
else if (cookieFile.exists())
else if (cookieFile != null && cookieFile.exists())
result = new ExternalTor(controlPort, cookieFile, useSafeCookieAuthentication);
else
result = new ExternalTor(controlPort);