From f16f5fbc6d21304cdc7d654e1997a2b4b52920bb Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sun, 6 Oct 2024 22:59:49 +0700 Subject: [PATCH] [FIX] NPE: User not found and permissions enabled --- .../launchserver/auth/core/AbstractSQLCoreProvider.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java index 4e732542..bdb4a4c5 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java @@ -295,7 +295,9 @@ private SQLUser queryUser(String sql, String value) throws SQLException { user = constructUser(set); } } - user.permissions = requestPermissions(user.uuid.toString()); + if(user != null) { + user.permissions = requestPermissions(user.uuid.toString()); + } return user; }