Skip to content

Commit 1b38759

Browse files
committed
fix crash for configuring colour pickers with alpha disabled
1 parent f2f0014 commit 1b38759

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/dev/isxander/yacl3/gui/controllers/ColorPickerWidget.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ public boolean clickedSatLightGradient(double mouseX, double mouseY) {
198198
}
199199

200200
private boolean isHoveringAlphaSlider(double mouseX, double mouseY) {
201+
if (alphaGradientDim == null) return false;
201202
return mouseY >= alphaGradientDim.y() && mouseY <= alphaGradientDim.yLimit()
202203
&& mouseX >= alphaGradientDim.x() && mouseX <= alphaGradientDim.xLimit();
203204
}

0 commit comments

Comments
 (0)