From 1d32ce757f6ebd615c2828f3f1c2f0206617ba30 Mon Sep 17 00:00:00 2001 From: DaniTheSkunk <> Date: Sat, 17 Dec 2022 13:07:38 +0000 Subject: [PATCH] don't crash TextureAtlas.repack when empty --- com/danitheskunk/skunkworks/backends/gl/TextureAtlas.java | 4 ++++ 1 file changed, 4 insertions(+) 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();