Don't fail to run if prefs were corrupt.

This commit is contained in:
Nathan Sweet 2017-09-30 20:19:58 +02:00
parent 5e829cb006
commit eb84807152

View File

@ -904,6 +904,7 @@ public class SkeletonViewer extends ApplicationAdapter {
}
void loadPrefs () {
try {
debugBonesCheckbox.setChecked(prefs.getBoolean("debugBones", true));
debugRegionsCheckbox.setChecked(prefs.getBoolean("debugRegions", false));
debugMeshHullCheckbox.setChecked(prefs.getBoolean("debugMeshHull", false));
@ -924,6 +925,10 @@ public class SkeletonViewer extends ApplicationAdapter {
scaleSlider.setValue(prefs.getFloat("scale", 1));
animationList.setSelected(prefs.getString("animationName", null));
skinList.setSelected(prefs.getString("skinName", null));
} catch (Exception ex) {
System.out.println("Unable to read preferences:");
ex.printStackTrace();
}
}
}