mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Fixed Skeleton Viewer NPE on load.
This commit is contained in:
parent
93fe75d4b0
commit
0f518bf57d
@ -118,6 +118,7 @@ public class SkeletonViewer extends ApplicationAdapter {
|
|||||||
|
|
||||||
void loadSkeleton (final @Null FileHandle skeletonFile) {
|
void loadSkeleton (final @Null FileHandle skeletonFile) {
|
||||||
if (skeletonFile == null) return;
|
if (skeletonFile == null) return;
|
||||||
|
this.skeletonFile = skeletonFile;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
atlas = new SkeletonViewAtlas(this, skeletonFile);
|
atlas = new SkeletonViewAtlas(this, skeletonFile);
|
||||||
@ -137,6 +138,7 @@ public class SkeletonViewer extends ApplicationAdapter {
|
|||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
ui.toast("Error loading skeleton: " + skeletonFile.name());
|
ui.toast("Error loading skeleton: " + skeletonFile.name());
|
||||||
lastModifiedCheck = 5;
|
lastModifiedCheck = 5;
|
||||||
|
this.skeletonFile = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,7 +156,6 @@ public class SkeletonViewer extends ApplicationAdapter {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.skeletonFile = skeletonFile;
|
|
||||||
skeletonModified = skeletonFile.lastModified();
|
skeletonModified = skeletonFile.lastModified();
|
||||||
atlasModified = atlas.lastModified();
|
atlasModified = atlas.lastModified();
|
||||||
lastModifiedCheck = checkModifiedInterval;
|
lastModifiedCheck = checkModifiedInterval;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user