From: tcofoegbu Date: Tue, 12 Jul 2016 10:03:50 +0000 (+0100) Subject: JAL-2135 NPE bugfix when parsing a structure file with Jmol and id & inFile is null X-Git-Tag: Release_2_10_0~144 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f631b3e5e94abd52848ba61307f3376f87ebafa6;p=jalview.git JAL-2135 NPE bugfix when parsing a structure file with Jmol and id & inFile is null --- 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()) {