From: Jim Procter Date: Fri, 4 Oct 2024 15:03:38 +0000 (+0100) Subject: JAL-4470 fix: check for workers!=null before checking its empty... X-Git-Tag: Release_2_11_4_1~3^2^2~3 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=54b1c9efca00df99bc3a502fe76d3bbf98938b96;p=jalview.git JAL-4470 fix: check for workers!=null before checking its empty... --- diff --git a/src/jalview/gui/PopupMenu.java b/src/jalview/gui/PopupMenu.java index f4dd579..31e7cbb 100644 --- a/src/jalview/gui/PopupMenu.java +++ b/src/jalview/gui/PopupMenu.java @@ -1779,7 +1779,7 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener List workers = ap.alignFrame.getViewport() .getCalcManager().getRegisteredWorkersOfClass( SecondaryStructureConsensusThread.class); - if (!workers.isEmpty()) + if (workers!=null && !workers.isEmpty()) { ap.alignFrame.getViewport().getCalcManager()