JAL-4411 catch cases when 'ssStructFilePathNameInPDB' is null - this happens when...
authorJim Procter <jprocter@dundee.ac.uk>
Thu, 27 Jun 2024 16:28:18 +0000 (17:28 +0100)
committerJim Procter <jprocter@dundee.ac.uk>
Thu, 27 Jun 2024 16:28:18 +0000 (17:28 +0100)
src/jalview/structure/StructureSelectionManager.java

index 36c8764..95f93ea 100644 (file)
@@ -711,7 +711,7 @@ public class StructureSelectionManager
       //Match the PDB entry using file path in the pdb data model and get the provider
       Vector<PDBEntry> pdbEntries = seq.getDatasetSequence().getAllPDBEntries();
       for(PDBEntry pdbEntry : pdbEntries) {        
-        if(ssStructFilePathNameInPDB.startsWith(pdbEntry.getFile())) {
+        if(ssStructFilePathNameInPDB!=null && pdbEntry.getFile()!=null && ssStructFilePathNameInPDB.startsWith(pdbEntry.getFile())) {
           provider = pdbEntry.getProvider();
           break;
         }