From aced575921e691458a7ef4bfeaaae80ea079d425 Mon Sep 17 00:00:00 2001 From: Gravita Date: Wed, 16 Dec 2020 14:07:46 +0700 Subject: [PATCH] [FIX] SessionManager NPE --- .../pro/gravit/launchserver/manangers/SessionManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/SessionManager.java b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/SessionManager.java index d6066868..92c2a7d2 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/SessionManager.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/SessionManager.java @@ -73,7 +73,10 @@ public void garbageCollection() { public Client getClient(UUID session) { - return restoreFromString(server.config.sessions.getSessionData(session)); + if(session == null) return null; + byte[] data = server.config.sessions.getSessionData(session); + if(data == null) return null; + return restoreFromString(data); }