diff options
author | FalsePattern <me@falsepattern.com> | 2023-12-01 13:32:01 +0100 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2023-12-01 18:34:00 +0100 |
commit | 7534096b6f027fd51016618f8862f8dc8b673b5c (patch) | |
tree | 0a65f97eafcf0a28a8b83c99e172b6cf01322bd8 /src | |
parent | 68357a8cc9c8cf9eab9e177cb6aea18cfbc3f584 (diff) | |
download | Neodymium-7534096b6f027fd51016618f8862f8dc8b673b5c.tar.gz Neodymium-7534096b6f027fd51016618f8862f8dc8b673b5c.tar.bz2 Neodymium-7534096b6f027fd51016618f8862f8dc8b673b5c.zip |
fix occasional NPE when config reload triggers
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/makamys/neodymium/config/Config.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/makamys/neodymium/config/Config.java b/src/main/java/makamys/neodymium/config/Config.java index e644d9b..8d6902b 100644 --- a/src/main/java/makamys/neodymium/config/Config.java +++ b/src/main/java/makamys/neodymium/config/Config.java @@ -26,6 +26,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; +import java.util.Objects; import org.apache.commons.lang3.EnumUtils; import org.lwjgl.input.Keyboard; @@ -109,7 +110,7 @@ public class Config { config.setCategoryComment("debug", "Note: Some debug features are only available in creative mode or dev environments."); - if(config.hasChanged() || (!config.getLoadedConfigVersion().equals(config.getDefinedConfigVersion()))) { + if(config.hasChanged() || (!Objects.equals(config.getLoadedConfigVersion(), config.getDefinedConfigVersion()))) { config.save(); } |