Skip to content

Commit

Permalink
Fix #1053 NPE when loading with old configs
Browse files Browse the repository at this point in the history
  • Loading branch information
mezz committed Feb 2, 2016
1 parent 6265c01 commit bbd39ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Expand Up @@ -2,4 +2,4 @@ mcversion=1.7.10
forgeversion=10.13.4.1566-1.7.10
version_major=4
version_minor=2
version_patch=6
version_patch=7
3 changes: 2 additions & 1 deletion src/main/java/forestry/plugins/PluginApiculture.java
Expand Up @@ -17,6 +17,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Random;
import java.util.Set;

Expand Down Expand Up @@ -213,7 +214,7 @@ public void doInit() {
}

LocalizedConfiguration config = new LocalizedConfiguration(configFile, "2.0.0");
if (!config.getLoadedConfigVersion().equals(config.getDefinedConfigVersion())) {
if (!Objects.equals(config.getLoadedConfigVersion(), config.getDefinedConfigVersion())) {
boolean deleted = configFile.delete();
if (deleted) {
config = new LocalizedConfiguration(configFile, "2.0.0");
Expand Down

0 comments on commit bbd39ea

Please sign in to comment.