Options: fix memory leaks (#928)

This commit is contained in:
slprime authored and GitHub committed 2026-05-06 22:36:07 +02:00
1 parent 2104184077
commit 41554f4c5b
13 files changed
+31 -21

No files matched your search

@@ -57,10 +57,10 @@ public abstract class OptionButton extends Option {
}
public Rectangle buttonSize() {
if (getPrefix() == null) return new Rectangle(0, 0, slot.slotWidth(), 20);
if (getPrefix() == null) return new Rectangle(0, 0, getSlot().slotWidth(), 20);
int width = Math.max(60, getStringWidth(getButtonText()) + 8);
return new Rectangle(slot.slotWidth() - width, 0, width, 20);
return new Rectangle(getSlot().slotWidth() - width, 0, width, 20);
}
public String getPrefix() {