diff --git a/src/yugecin/opsudance/options/Configuration.java b/src/yugecin/opsudance/options/Configuration.java index 74d3aca3..45218c3b 100644 --- a/src/yugecin/opsudance/options/Configuration.java +++ b/src/yugecin/opsudance/options/Configuration.java @@ -174,7 +174,7 @@ public class Configuration { } private File loadDirectory(File dir, File defaultDir, String kind) { - if (dir.exists() && dir.isDirectory()) { + if (dir != null && dir.exists() && dir.isDirectory()) { return dir; } if (!defaultDir.isDirectory() && !defaultDir.mkdir()) { diff --git a/src/yugecin/opsudance/options/OptionsService.java b/src/yugecin/opsudance/options/OptionsService.java index 01c05d9e..659726a7 100644 --- a/src/yugecin/opsudance/options/OptionsService.java +++ b/src/yugecin/opsudance/options/OptionsService.java @@ -50,6 +50,7 @@ public class OptionsService { public void loadOptions() { // if no config file, use default settings if (!config.OPTIONS_FILE.isFile()) { + config.loadDirectories(); saveOptions(); return; }