From: David ‘Bombe’ Roden Date: Wed, 16 Jan 2013 06:17:53 +0000 (+0100) Subject: Prevent NPE. X-Git-Tag: 0.8.5^2~3^2~135 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;ds=inline;h=299b20708098b51ae3dd48dae5d7f7e4934285b8;p=Sone.git Prevent NPE. --- diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 6f32230..2a2eb8f 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -419,7 +419,7 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis sone = new Sone(id, true); sones.put(id, sone); } - if (!sone.isLocal()) { + if ((sone != null) && !sone.isLocal()) { sone = new Sone(id, true); sones.put(id, sone); }