diff --git a/com/danitheskunk/skunkworks/backends/gl/TextureAtlas.java b/com/danitheskunk/skunkworks/backends/gl/TextureAtlas.java index 8c78853..d064b9e 100644 --- a/com/danitheskunk/skunkworks/backends/gl/TextureAtlas.java +++ b/com/danitheskunk/skunkworks/backends/gl/TextureAtlas.java @@ -70,6 +70,10 @@ class TextureAtlas { int y = 0; int height; + if(textures.isEmpty()) { + return; + } + textures.sort(new TextureHeightComparator().reversed()); height = textures.get(0).getImg().getHeight();