Browse Source

Fixed Skeleton Viewer for libgdx TextureAtlas changes.

Nathan Sweet 4 years ago
parent
commit
be84904181

+ 4 - 2
spine-libgdx/spine-skeletonviewer/src/com/esotericsoftware/spine/SkeletonViewer.java

@@ -178,8 +178,10 @@ public class SkeletonViewer extends ApplicationAdapter {
 			final AtlasRegion fake = new AtlasRegion(new Texture(pixmap), 0, 0, 32, 32);
 			pixmap.dispose();
 
-			TextureAtlasData atlasData = null;
-			if (atlasFile != null) {
+			TextureAtlasData atlasData;
+			if (atlasFile == null)
+				atlasData = new TextureAtlasData();
+			else {
 				atlasData = new TextureAtlasData(atlasFile, atlasFile.parent(), false);
 				boolean linear = true;
 				for (int i = 0, n = atlasData.getPages().size; i < n; i++) {