From e12b14834bd91d032f80ef1cba4cec92e1ea9256 Mon Sep 17 00:00:00 2001 From: Joe Date: Wed, 12 Aug 2020 00:19:12 +0100 Subject: [PATCH] Fix crash on corrupted extra server data --- gradle.properties | 2 +- .../java/net/earthcomputer/multiconnect/connect/ServersExt.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 64cb803b..0ee9d83d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ org.gradle.jvmargs=-Xmx1G loader_version=aafae0b8 # Mod Properties - mod_version = 1.3.9 + mod_version = 1.3.10 maven_group = net.earthcomputer archives_base_name = multiconnect diff --git a/src/main/java/net/earthcomputer/multiconnect/connect/ServersExt.java b/src/main/java/net/earthcomputer/multiconnect/connect/ServersExt.java index 70139aeb..df051aa5 100644 --- a/src/main/java/net/earthcomputer/multiconnect/connect/ServersExt.java +++ b/src/main/java/net/earthcomputer/multiconnect/connect/ServersExt.java @@ -24,7 +24,6 @@ public static ServersExt getInstance() { if (configFile.exists()) { try (FileReader reader = new FileReader(configFile)) { instance = GSON.fromJson(reader, ServersExt.class); - instance.normalize(); } catch (IOException e) { LOGGER.error("Failed to load extra server data", e); } @@ -32,6 +31,7 @@ public static ServersExt getInstance() { if (instance == null) { instance = new ServersExt(); } + instance.normalize(); } return instance; }