From: David ‘Bombe’ Roden Date: Mon, 20 Jul 2015 16:47:40 +0000 (+0200) Subject: Prevent potential NullPointerException X-Git-Tag: 0.9.3^2~15^2~5 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=647c57e2e15fc11cc63a270adb27eb59a5f629ff;p=Sone.git Prevent potential NullPointerException --- 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()); } }; }