From: Jim Procter Date: Thu, 27 Jun 2024 16:28:18 +0000 (+0100) Subject: JAL-4411 catch cases when 'ssStructFilePathNameInPDB' is null - this happens when... X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=76e5a83cce4fd1dd310300600b5d01f5b60e3794;p=jalview.git JAL-4411 catch cases when 'ssStructFilePathNameInPDB' is null - this happens when files are imported from Jalview project - which may mean provider is not conserved in round trip to project --- diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index 36c8764..95f93ea 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -711,7 +711,7 @@ public class StructureSelectionManager //Match the PDB entry using file path in the pdb data model and get the provider Vector 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; }