JAL-674 check for null vector before ...
authorJim Procter <j.procter@dundee.ac.uk>
Tue, 21 Oct 2014 16:36:13 +0000 (17:36 +0100)
committerJim Procter <j.procter@dundee.ac.uk>
Tue, 21 Oct 2014 16:36:13 +0000 (17:36 +0100)
src/MCview/PDBfile.java

index a99f172..132aea8 100755 (executable)
@@ -331,11 +331,17 @@ public class PDBfile extends jalview.io.AlignFile
         {
           if (sq.getDatasetSequence() != null)
           {
-            sq.getDatasetSequence().getPDBId().clear();
+            if (sq.getDatasetSequence().getPDBId() != null)
+            {
+              sq.getDatasetSequence().getPDBId().clear();
+            }
           }
           else
           {
-            sq.getPDBId().clear();
+            if (sq.getPDBId() != null)
+            {
+              sq.getPDBId().clear();
+            }
           }
         }
         AlignSeq.replaceMatchingSeqsWith(seqs, annotations, prot, al, AlignSeq.PEP, false);
@@ -370,11 +376,17 @@ public class PDBfile extends jalview.io.AlignFile
         {
           if (sq.getDatasetSequence() != null)
           {
-            sq.getDatasetSequence().getPDBId().clear();
+            if (sq.getDatasetSequence().getPDBId() != null)
+            {
+              sq.getDatasetSequence().getPDBId().clear();
+            }
           }
           else
           {
-            sq.getPDBId().clear();
+            if (sq.getPDBId() != null)
+            {
+              sq.getDatasetSequence().getPDBId().clear();
+            }
           }
         }
         AlignSeq.replaceMatchingSeqsWith(seqs, annotations, rna, al, AlignSeq.DNA, false);