From f631b3e5e94abd52848ba61307f3376f87ebafa6 Mon Sep 17 00:00:00 2001 From: tcofoegbu Date: Tue, 12 Jul 2016 11:03:50 +0100 Subject: [PATCH] JAL-2135 NPE bugfix when parsing a structure file with Jmol and id & inFile is null --- src/jalview/ext/jmol/JmolParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jalview/ext/jmol/JmolParser.java b/src/jalview/ext/jmol/JmolParser.java index c514503..5effd2e 100644 --- a/src/jalview/ext/jmol/JmolParser.java +++ b/src/jalview/ext/jmol/JmolParser.java @@ -172,7 +172,7 @@ public class JmolParser extends StructureFile implements JmolStatusListener if (getId() == null) { - setId(inFile.getName()); + setId((inFile != null) ? inFile.getName() : safeName(getDataName())); } for (PDBChain chain : getChains()) { -- 1.7.10.2