Fixed a crash with width/height == 0

This commit is contained in:
Anuken 2026-02-19 22:05:15 -05:00
parent f8ab28196b
commit b00b88476b

View file

@ -35,7 +35,7 @@ public class IconSelectDialog extends Dialog{
consumer.get(0);
});
int cols = (int)Math.min(20, Core.graphics.getWidth() / Scl.scl(52f));
int cols = Math.max((int)Math.min(20, Core.graphics.getWidth() / Scl.scl(52f)), 1);
int i = 1;
for(var key : accessibleIcons){