From: David ‘Bombe’ Roden Date: Sun, 16 Jan 2011 13:46:03 +0000 (+0100) Subject: Return null trust when getting trust while not logged in. X-Git-Tag: 0.4.2^2~49 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=415b8c3b295775d66fb1db1d0f641e05fbbcca98;p=Sone.git Return null trust when getting trust while not logged in. --- diff --git a/src/main/java/net/pterodactylus/sone/template/SoneAccessor.java b/src/main/java/net/pterodactylus/sone/template/SoneAccessor.java index 7eaf085..beb7f2a 100644 --- a/src/main/java/net/pterodactylus/sone/template/SoneAccessor.java +++ b/src/main/java/net/pterodactylus/sone/template/SoneAccessor.java @@ -92,6 +92,9 @@ public class SoneAccessor extends ReflectionAccessor { return core.isLocked(sone); } else if (member.equals("trust")) { Sone currentSone = (Sone) dataProvider.get("currentSone"); + if (currentSone == null) { + return null; + } Trust trust = core.getTrust(currentSone, sone); if (trust == null) { return new Trust(null, null, null);