From 74bd84be1a51cd81100211af9237aac860ea5c5d Mon Sep 17 00:00:00 2001 From: Mateusz Warowny Date: Tue, 23 Nov 2021 16:31:12 +0100 Subject: [PATCH] JAL-3878 Handle nulls when filtering annotation workers by name. --- src/jalview/workers/AlignCalcManager2.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } -- 1.7.10.2