Fixed NullPointerException caused by ComponentListModel

This commit is contained in:
Kai S. K. Engelbart 2020-03-14 17:10:11 +01:00
parent 1fef10769f
commit b46bfd1181

View File

@ -33,8 +33,10 @@ public final class ComponentListModel<E> implements Iterable<E>, Serializable {
* @since Envoy v0.3-alpha
*/
public boolean add(E e) {
if (componentList != null) componentList.add(e);
if (componentList != null) {
componentList.add(e);
componentList.revalidate();
}
return elements.add(e);
}