mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Fixed NPE if file failed to load.
This commit is contained in:
parent
9cb1a2852b
commit
e38213fb67
@ -232,6 +232,7 @@ public class SkeletonViewer extends ApplicationAdapter {
|
||||
ui.stage.draw();
|
||||
|
||||
// Draw indicator for timeline position.
|
||||
if (state != null) {
|
||||
ShapeRenderer shapes = debugRenderer.getShapeRenderer();
|
||||
TrackEntry entry = state.getCurrent(0);
|
||||
if (entry != null) {
|
||||
@ -244,6 +245,7 @@ public class SkeletonViewer extends ApplicationAdapter {
|
||||
shapes.end();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void resize (int width, int height) {
|
||||
batch.getProjectionMatrix().setToOrtho2D(0, 0, width, height);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user