From b46bfd1181ef228d5c5bd9c772cfcb77252d1f35 Mon Sep 17 00:00:00 2001 From: CyB3RC0nN0R Date: Sat, 14 Mar 2020 17:10:11 +0100 Subject: [PATCH] Fixed NullPointerException caused by ComponentListModel --- src/main/java/envoy/client/ui/list/ComponentListModel.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/envoy/client/ui/list/ComponentListModel.java b/src/main/java/envoy/client/ui/list/ComponentListModel.java index 62a8643..95775c1 100644 --- a/src/main/java/envoy/client/ui/list/ComponentListModel.java +++ b/src/main/java/envoy/client/ui/list/ComponentListModel.java @@ -33,8 +33,10 @@ public final class ComponentListModel implements Iterable, Serializable { * @since Envoy v0.3-alpha */ public boolean add(E e) { - if (componentList != null) componentList.add(e); - componentList.revalidate(); + if (componentList != null) { + componentList.add(e); + componentList.revalidate(); + } return elements.add(e); }