From 6b12e42f0c5e0ee656e978e81f74887c7828f512 Mon Sep 17 00:00:00 2001 From: Dave Date: Tue, 23 Dec 2014 10:48:10 +0200 Subject: [PATCH] Catch nullpointerexception on NoCore.getUser, convert into SessionExpired --- src/nodash/core/spheres/NoSessionSphere.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/nodash/core/spheres/NoSessionSphere.java b/src/nodash/core/spheres/NoSessionSphere.java index df64559..5652a81 100644 --- a/src/nodash/core/spheres/NoSessionSphere.java +++ b/src/nodash/core/spheres/NoSessionSphere.java @@ -119,7 +119,11 @@ public final class NoSessionSphere { UUID uuid = NoSession.decryptUUID(encryptedUUID); if (NoSessionSphere.sessions.containsKey(uuid)) { NoSessionSphere.pruneSingle(uuid); - return NoSessionSphere.sessions.get(uuid).getNoUser(); + try { + return NoSessionSphere.sessions.get(uuid).getNoUser(); + } catch (NullPointerException e) { + throw new NoSessionExpiredException(); + } } throw new NoSessionExpiredException(); }