diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigColorElement.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigColorElement.java index a8a361981..9dc88c65d 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigColorElement.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigColorElement.java @@ -95,7 +95,9 @@ else if (open) { protected void setColor(OneColor color) { try { + if (field == null) return; Object colorField = field.get(parent); + if (colorField == null || !(colorField instanceof OneColor)) return; if (!color.equals(colorField)) { ((OneColor) colorField).setFromOneColor(color); this.triggerListeners();