JAL-2135 NPE bugfix when parsing a structure file with Jmol and id & inFile is null
[jalview.git] / src / jalview / ext / jmol / JmolParser.java
index c514503..5effd2e 100644 (file)
@@ -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())
       {