mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-14 02:34:10 +00:00
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:
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;
|
||||
|
||||
Reference in new issue
Block a user