From 044ddfcf212ee69091e0b854ec02769fc125477b Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 24 Nov 2015 21:18:27 +0100 Subject: [PATCH] Prevent NPE if last good version is null --- src/main/java/net/pterodactylus/fcp/AddPeer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/fcp/AddPeer.java b/src/main/java/net/pterodactylus/fcp/AddPeer.java index e9ad80d..f098106 100644 --- a/src/main/java/net/pterodactylus/fcp/AddPeer.java +++ b/src/main/java/net/pterodactylus/fcp/AddPeer.java @@ -80,7 +80,7 @@ public class AddPeer extends FcpMessage { * The noderef of the peer */ private void setNodeRef(NodeRef nodeRef) { - setField("lastGoodVersion", nodeRef.getLastGoodVersion().toString()); + setField("lastGoodVersion", String.valueOf(nodeRef.getLastGoodVersion())); setField("opennet", String.valueOf(nodeRef.isOpennet())); setField("identity", nodeRef.getIdentity()); setField("myName", nodeRef.getMyName()); -- 2.7.4