From: Mateusz Warowny Date: Tue, 23 Nov 2021 15:31:12 +0000 (+0100) Subject: JAL-3878 Handle nulls when filtering annotation workers by name. X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=74bd84be1a51cd81100211af9237aac860ea5c5d;p=jalview.git JAL-3878 Handle nulls when filtering annotation workers by name. --- diff --git a/src/jalview/workers/AlignCalcManager2.java b/src/jalview/workers/AlignCalcManager2.java index 5c25668..e4574d3 100644 --- a/src/jalview/workers/AlignCalcManager2.java +++ b/src/jalview/workers/AlignCalcManager2.java @@ -317,7 +317,7 @@ public class AlignCalcManager2 implements AlignCalcManagerI2 List collected = new ArrayList<>(); for (var worker : getWorkers()) { - if (worker.getCalcName().equals(name)) + if (worker.getCalcName() != null && worker.getCalcName().equals(name)) { collected.add(worker); } @@ -371,7 +371,7 @@ public class AlignCalcManager2 implements AlignCalcManagerI2 { for (var worker : getWorkers()) { - if (worker.getCalcName().equals(name)) + if (worker.getCalcName() != null && worker.getCalcName().equals(name)) { removeWorker(worker); }