fix bitcoin core cookie dir not present npe

This commit is contained in:
Craig Raw 2021-01-28 12:45:12 +02:00
parent ac470f64c1
commit 095518e858

View file

@ -112,7 +112,7 @@ public class Bwt {
Config config = Config.get(); Config config = Config.get();
bwtConfig.bitcoindUrl = config.getCoreServer(); bwtConfig.bitcoindUrl = config.getCoreServer();
if(config.getCoreAuthType() == CoreAuthType.COOKIE) { if(config.getCoreAuthType() == CoreAuthType.COOKIE && config.getCoreDataDir() != null) {
bwtConfig.bitcoindDir = config.getCoreDataDir().getAbsolutePath() + "/"; bwtConfig.bitcoindDir = config.getCoreDataDir().getAbsolutePath() + "/";
} else { } else {
bwtConfig.bitcoindAuth = config.getCoreAuth(); bwtConfig.bitcoindAuth = config.getCoreAuth();