Don't try to load last file if missing.

This commit is contained in:
Nathan Sweet 2022-01-25 09:20:39 -04:00
parent a40fdb4865
commit 26cce82206

View File

@ -102,8 +102,9 @@ public class SkeletonViewer extends ApplicationAdapter {
ui.loadPrefs();
if (args.length == 0) {
loadSkeleton(
Gdx.files.internal(Gdx.app.getPreferences("spine-skeletonviewer").getString("lastFile", "spineboy/spineboy.json")));
FileHandle file = Gdx.files
.internal(Gdx.app.getPreferences("spine-skeletonviewer").getString("lastFile", "spineboy/spineboy.json"));
if (file.exists()) loadSkeleton(file);
} else
loadSkeleton(Gdx.files.internal(args[0]));