From ef51cf5702a639080200dbfca2f61844fbbf9e86 Mon Sep 17 00:00:00 2001 From: CalDescent Date: Thu, 2 Jun 2022 12:46:11 +0100 Subject: [PATCH] Added defensiveness in getOnlineTimestampModulus(), just in case NTP.getTime() returns null --- src/main/java/org/qortal/controller/OnlineAccountsManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/qortal/controller/OnlineAccountsManager.java b/src/main/java/org/qortal/controller/OnlineAccountsManager.java index a5f86b48..092cae05 100644 --- a/src/main/java/org/qortal/controller/OnlineAccountsManager.java +++ b/src/main/java/org/qortal/controller/OnlineAccountsManager.java @@ -117,7 +117,8 @@ public class OnlineAccountsManager extends Thread { } public static long getOnlineTimestampModulus() { - if (NTP.getTime() >= BlockChain.getInstance().getOnlineAccountsModulusV2Timestamp()) { + Long now = NTP.getTime(); + if (now != null && now >= BlockChain.getInstance().getOnlineAccountsModulusV2Timestamp()) { return ONLINE_TIMESTAMP_MODULUS_V2; } return ONLINE_TIMESTAMP_MODULUS_V1;