Skip to content

Commit 03bede4

Browse files
committed
more logic errors fixed
1 parent f624f85 commit 03bede4

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/main/java/me/cortex/voxy/client/VoxyClientInstance.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,12 @@ private static SectionStorageConfig getCreateStorageConfig(Path path) {
8080
try {
8181
config = Serialization.GSON.fromJson(Files.readString(json), Config.class);
8282
if (config == null) {
83-
throw new IllegalStateException("Config deserialization null, reverting to default");
84-
}
85-
if (config.sectionStorageConfig == null) {
86-
throw new IllegalStateException("Config section storage null, reverting to default");
83+
Logger.error("Config deserialization null, reverting to default");
84+
} else {
85+
if (config.sectionStorageConfig == null) {
86+
Logger.error("Config section storage null, reverting to default");
87+
config = null;
88+
}
8789
}
8890
} catch (Exception e) {
8991
Logger.error("Failed to load the storage configuration file, resetting it to default, this will probably break your save if you used a custom storage config", e);

0 commit comments

Comments
 (0)