From 647c57e2e15fc11cc63a270adb27eb59a5f629ff Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 20 Jul 2015 18:47:40 +0200 Subject: [PATCH] Prevent potential NullPointerException --- .../java/net/pterodactylus/sone/freenet/wot/IdentityChangeDetector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/sone/freenet/wot/IdentityChangeDetector.java b/src/main/java/net/pterodactylus/sone/freenet/wot/IdentityChangeDetector.java index a8cb62b..2fe10df 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/wot/IdentityChangeDetector.java +++ b/src/main/java/net/pterodactylus/sone/freenet/wot/IdentityChangeDetector.java @@ -142,7 +142,7 @@ public class IdentityChangeDetector { return new Predicate() { @Override public boolean apply(Identity identity) { - return identities.containsKey(identity.getId()); + return (identity != null) && identities.containsKey(identity.getId()); } }; } -- 2.7.4