mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-03-09 08:20:55 -07:00
Fixed a crash with width/height == 0
This commit is contained in:
parent
f8ab28196b
commit
b00b88476b
1 changed files with 1 additions and 1 deletions
|
|
@ -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){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue