Fixed crash when UI took too long to initialize

This commit is contained in:
Lenni0451 2023-01-08 18:53:36 +01:00
parent bf46dba694
commit 1b5edd4808
2 changed files with 5 additions and 1 deletions

View File

@ -6,4 +6,4 @@ org.gradle.configureondemand=true
# Project properties
maven_name=ViaProxy
maven_group=net.raphimc
maven_version=3.0.2
maven_version=3.0.3

View File

@ -110,6 +110,10 @@ public class ViaProxy {
updateCheckThread.start();
loaderThread.join();
accountRefreshThread.join();
while (ui[0] == null) {
Logger.LOGGER.info("Waiting for UI to be initialized...");
Thread.sleep(1000);
}
ui[0].setReady();
Logger.LOGGER.info("ViaProxy started successfully!");
return;