Fix divide by zero clicking the profiles scrollbar

The scrollbar hit test was pure geometry, so clicking its column before the
profile list had loaded - or on any list short enough not to scroll - divided
by a maxScrollY of zero. The draw path already guarded on the same value.
This commit is contained in:
KAMKEEL committed 2026-08-11 03:19:52 -04:00
1 parent 0829b6285f
commit 5aa843966a
1 file changed
+3
@@ -429,6 +429,9 @@ public class GuiProfiles extends GuiCNPCInventory implements ISubGuiListener, IC
}
private boolean isMouseOverScrollbar(int mouseX, int mouseY) {
if (maxScrollY <= 0)
return false;
int scrollbarX = guiLeft + xSize + 30;
int scrollbarY = guiTop + 27;
int scrollbarHeight = ySize - 35;