JAL-4411 Bug fix
authorRenia Correya <rcorreya001@dundee.ac.uk>
Fri, 12 Jul 2024 09:30:11 +0000 (10:30 +0100)
committerRenia Correya <rcorreya001@dundee.ac.uk>
Fri, 12 Jul 2024 09:30:11 +0000 (10:30 +0100)
src/jalview/structure/StructureSelectionManager.java

index cade4f6..7248e47 100644 (file)
@@ -712,11 +712,13 @@ public class StructureSelectionManager
       if(seq.getDatasetSequence() != null) {
         Vector<PDBEntry> pdbEntries = seq.getDatasetSequence().getAllPDBEntries();
         if(pdbEntries != null) {
-          for(PDBEntry pdbEntry : pdbEntries) {        
-            if(ssStructFilePathNameInPDB.startsWith(pdbEntry.getFile())) {
-              provider = pdbEntry.getProvider();
-              break;
-            }        
+          for(PDBEntry pdbEntry : pdbEntries) {
+            if(pdbEntry.getFile()!=null) {
+              if(ssStructFilePathNameInPDB.startsWith(pdbEntry.getFile())) {
+                provider = pdbEntry.getProvider();
+                break;
+              }        
+            }
           }