Skip to content

Commit

Permalink
Add extra failsafes to ConfigColorElement
Browse files Browse the repository at this point in the history
  • Loading branch information
Wyvest authored Jun 22, 2024
1 parent 5a48dde commit 0f69c95
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 0f69c95

Please sign in to comment.