[libgdx] Fixed Skeleton Viewer NPE when project fails to open.

This commit is contained in:
NathanSweet 2016-11-28 19:25:10 +01:00
parent d19a4b22db
commit 15145fe709

View File

@ -703,7 +703,7 @@ public class SkeletonViewer extends ApplicationAdapter {
}
void render () {
if (state.getCurrent(ui.trackButtons.getCheckedIndex()) == null) {
if (state != null && state.getCurrent(ui.trackButtons.getCheckedIndex()) == null) {
ui.animationList.getSelection().setProgrammaticChangeEvents(false);
ui.animationList.setSelected(null);
ui.animationList.getSelection().setProgrammaticChangeEvents(true);