From f9c5cd1f2cbaa4ab1014bfa81b276a76602a370e Mon Sep 17 00:00:00 2001 From: woodser Date: Thu, 14 Jul 2022 13:45:50 -0400 Subject: [PATCH] fix npe if no localhost connection --- .../main/java/bisq/core/api/CoreMoneroConnectionsService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/bisq/core/api/CoreMoneroConnectionsService.java b/core/src/main/java/bisq/core/api/CoreMoneroConnectionsService.java index 1e74eb701a..754973def6 100644 --- a/core/src/main/java/bisq/core/api/CoreMoneroConnectionsService.java +++ b/core/src/main/java/bisq/core/api/CoreMoneroConnectionsService.java @@ -240,7 +240,7 @@ public final class CoreMoneroConnectionsService { boolean isLocal = CoreMoneroNodeService.isLocalHost(daemon.getRpcConnection().getUri()); if (isLocal) { updateDaemonInfo(); - if (lastInfo.isBusySyncing() || (lastInfo.getHeightWithoutBootstrap() != null && lastInfo.getHeightWithoutBootstrap() > 0 && lastInfo.getHeightWithoutBootstrap() < lastInfo.getHeight())) return REFRESH_PERIOD_REMOTE_MS; // refresh slower if syncing or bootstrapped + if (lastInfo != null && (lastInfo.isBusySyncing() || (lastInfo.getHeightWithoutBootstrap() != null && lastInfo.getHeightWithoutBootstrap() > 0 && lastInfo.getHeightWithoutBootstrap() < lastInfo.getHeight()))) return REFRESH_PERIOD_REMOTE_MS; // refresh slower if syncing or bootstrapped else return REFRESH_PERIOD_LOCAL_MS; // TODO: announce faster refresh after done syncing } else { return REFRESH_PERIOD_REMOTE_MS;