From 060fb4cd10b89e532cfcc26039aafec6d83c052d Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Tue, 21 Oct 2014 17:36:13 +0100 Subject: [PATCH] JAL-674 check for null vector before ... --- src/MCview/PDBfile.java | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/MCview/PDBfile.java b/src/MCview/PDBfile.java index a99f172..132aea8 100755 --- a/src/MCview/PDBfile.java +++ b/src/MCview/PDBfile.java @@ -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); -- 1.7.10.2