Prevent NPE.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 16 Jan 2013 06:17:53 +0000 (07:17 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 16 Jan 2013 18:04:09 +0000 (19:04 +0100)
src/main/java/net/pterodactylus/sone/core/Core.java

index 6f32230..2a2eb8f 100644 (file)
@@ -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);
                        }