gui: fix incorrect settings loading

This commit is contained in:
Skylot
2017-12-17 13:01:23 +03:00
parent 001fa639be
commit 118fa98ca9
4 changed files with 12 additions and 3 deletions
@@ -43,6 +43,12 @@ public class JadxSettings extends JadxCLIArgs {
JadxSettingsAdapter.store(this);
}
public void fixOnLoad() {
if (threadsCount <= 0) {
threadsCount = DEFAULT_THREADS_COUNT;
}
}
public String getLastOpenFilePath() {
return lastOpenFilePath;
}
@@ -50,6 +50,7 @@ public class JadxSettingsAdapter {
return new JadxSettings();
}
LOG.debug("Loaded settings: {}", makeString(settings));
settings.fixOnLoad();
return settings;
} catch (Exception e) {
LOG.error("Error load settings", e);