From 76e5a83cce4fd1dd310300600b5d01f5b60e3794 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 27 Jun 2024 17:28:18 +0100 Subject: [PATCH] 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 --- src/jalview/structure/StructureSelectionManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 1.7.10.2