Don’t try to get a null Sone.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 14 Oct 2010 15:49:25 +0000 (17:49 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 14 Oct 2010 15:49:25 +0000 (17:49 +0200)
src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java

index 5f9ff5d..a152d30 100644 (file)
@@ -111,6 +111,9 @@ public class SoneTemplatePage extends TemplatePage {
                        return null;
                }
                String soneId = (String) session.getAttribute("Sone.CurrentSone");
+               if (soneId == null) {
+                       return null;
+               }
                for (Sone sone : webInterface.core().getSones()) {
                        if (sone.getId().equals(soneId)) {
                                return sone;