From 32a4729970d159d6fc5380fbb2e082fa34b63d20 Mon Sep 17 00:00:00 2001 From: Gravita Date: Wed, 9 Jun 2021 10:01:07 +0700 Subject: [PATCH] [FIX] NPE in ClientLauncherEntryPoint --- .../auth/core/MySQLCoreProvider.java | 18 +++++++++--------- .../client/ClientLauncherEntryPoint.java | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MySQLCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MySQLCoreProvider.java index c89446cc..d526f89a 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MySQLCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MySQLCoreProvider.java @@ -40,15 +40,15 @@ public class MySQLCoreProvider extends AuthCoreProvider implements AuthSupportHa public String tableHWID = "hwids"; public String tableHWIDLog = "hwidLog"; - private String sqlFindHardwareByPublicKey; - private String sqlFindHardwareByData; - private String sqlFindHardwareById; - private String sqlCreateHardware; - private String sqlCreateHWIDLog; - private String sqlUpdateHardwarePublicKey; - private String sqlUpdateHardwareBanned; - private String sqlUpdateUsers; - private String sqlUsersByHwidId; + private transient String sqlFindHardwareByPublicKey; + private transient String sqlFindHardwareByData; + private transient String sqlFindHardwareById; + private transient String sqlCreateHardware; + private transient String sqlCreateHWIDLog; + private transient String sqlUpdateHardwarePublicKey; + private transient String sqlUpdateHardwareBanned; + private transient String sqlUpdateUsers; + private transient String sqlUsersByHwidId; public PasswordVerifier passwordVerifier; public double criticalCompareLevel = 1.0; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java b/Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java index 5aa63049..c81914f2 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java @@ -101,7 +101,6 @@ public static void main(String[] args) throws Throwable { LogHelper.info("Using Sessions"); Request.setSession(params.session); } - Request.service.registerEventHandler(new BasicLauncherEventHandler()); checkJVMBitsAndVersion(params.profile.getMinJavaVersion(), params.profile.getRecommendJavaVersion(), params.profile.getMaxJavaVersion(), params.profile.isWarnMissJavaVersion()); LauncherEngine.modulesManager.invokeEvent(new ClientProcessInitPhase(engine, params)); @@ -121,6 +120,7 @@ public static void main(String[] args) throws Throwable { boolean digest = !profile.isUpdateFastCheck(); LogHelper.debug("Restore sessions"); Request.restore(); + Request.service.registerEventHandler(new BasicLauncherEventHandler()); Request.service.reconnectCallback = () -> { LogHelper.debug("WebSocket connect closed. Try reconnect");