From 857a1d0be8b5b8825422c1b634583e131f774fe3 Mon Sep 17 00:00:00 2001 From: woodser Date: Wed, 17 Aug 2022 18:10:28 -0400 Subject: [PATCH] fix npe validating pub key --- core/src/main/java/bisq/core/trade/protocol/TradeProtocol.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/bisq/core/trade/protocol/TradeProtocol.java b/core/src/main/java/bisq/core/trade/protocol/TradeProtocol.java index d95b045993..1fad03d706 100644 --- a/core/src/main/java/bisq/core/trade/protocol/TradeProtocol.java +++ b/core/src/main/java/bisq/core/trade/protocol/TradeProtocol.java @@ -588,7 +588,7 @@ public abstract class TradeProtocol implements DecryptedDirectMessageListener, D if (trade.getArbitratorPubKeyRing() != null && message.getSignaturePubKey().equals(trade.getArbitratorPubKeyRing().getSignaturePubKey())) return true; // not invalid if pub key rings are unknown - if (trade.getTradingPeer().getPubKeyRing() == null && trade.getArbitratorPubKeyRing() == null) return true; + if ((trade.getTradingPeer() == null || trade.getTradingPeer().getPubKeyRing() == null) && trade.getArbitratorPubKeyRing() == null) return true; // valid if peer's pub key ring if (trade.getTradingPeer() != null && trade.getTradingPeer().getPubKeyRing() != null && message.getSignaturePubKey().equals(trade.getTradingPeer().getPubKeyRing().getSignaturePubKey())) return true;