Browse Source

Prevent NPE when item to be rendered is null

pull/245/head
weisj 4 years ago committed by Jannis Weis
parent
commit
3c9056f29b
  1. 2
      core/src/main/java/com/github/weisj/darklaf/components/renderer/SimpleListCellRenderer.java

2
core/src/main/java/com/github/weisj/darklaf/components/renderer/SimpleListCellRenderer.java

@ -34,7 +34,7 @@ public class SimpleListCellRenderer<T> extends JLabel implements ListCellRendere
return new SimpleListCellRenderer<T>() { return new SimpleListCellRenderer<T>() {
@Override @Override
protected void customize(final T value) { protected void customize(final T value) {
setText(toText.apply(value)); setText(value != null ? toText.apply(value) : "");
} }
}; };
} }

Loading…
Cancel
Save