X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FLogoutPage.java;h=e6d298050dc0431ce07dcdca0c3bd4184dd0b545;hb=53a71d1d6b91e4d56af49a06f2e06bc4d11bf3eb;hp=bc4c56d33ca0d554e96e85f1cdb6a2a04e3b7234;hpb=6f019de1d4d9742981d851ac3c9097cca8bff58e;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/LogoutPage.java b/src/main/java/net/pterodactylus/sone/web/LogoutPage.java index bc4c56d..e6d2980 100644 --- a/src/main/java/net/pterodactylus/sone/web/LogoutPage.java +++ b/src/main/java/net/pterodactylus/sone/web/LogoutPage.java @@ -61,7 +61,7 @@ public class LogoutPage extends SoneTemplatePage { if (webInterface.getCore().getPreferences().isRequireFullAccess() && !toadletContext.isAllowedFullAccess()) { return false; } - return (getCurrentSone(toadletContext, false) != null) && (webInterface.getCore().getLocalSones().size() != 1); + return getCurrentSone(toadletContext, false).isPresent() && (webInterface.getCore().getLocalSones().size() != 1); } }