From: Ben Soares Date: Fri, 9 Dec 2022 13:05:10 +0000 (+0000) Subject: JAL-629 null check, fixed tests! X-Git-Tag: Release_2_11_3_0~14^2~228 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=fa027754c7e626c3811b0888e091837c7ab3bdd1;p=jalview.git JAL-629 null check, fixed tests! --- diff --git a/src/jalview/bin/Commands.java b/src/jalview/bin/Commands.java index 4239ec7..552dda6 100644 --- a/src/jalview/bin/Commands.java +++ b/src/jalview/bin/Commands.java @@ -42,16 +42,19 @@ public class Commands { argParser = ap; headless = h; - for (String id : argParser.linkedIds()) + if (argParser != null && argParser.linkedIds() != null) { - Commands cmds = new Commands(); - if (id == null) + for (String id : argParser.linkedIds()) { - cmds.processUnlinked(id); - } - else - { - cmds.processLinked(id); + Commands cmds = new Commands(); + if (id == null) + { + cmds.processUnlinked(id); + } + else + { + cmds.processLinked(id); + } } } }