From 23169813062957122bc246f05c2479cb36a9c509 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Fri, 27 Oct 2006 16:14:22 +0000 Subject: [PATCH] If sequence is null, dont add it --- src/jalview/datamodel/SequenceGroup.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/jalview/datamodel/SequenceGroup.java b/src/jalview/datamodel/SequenceGroup.java index 2bdd5f8..dc22704 100755 --- a/src/jalview/datamodel/SequenceGroup.java +++ b/src/jalview/datamodel/SequenceGroup.java @@ -119,6 +119,7 @@ public class SequenceGroup SequenceI [] seqs = new SequenceI[iSize]; SequenceI [] inorder = getSequencesInOrder(align); + for (int i = 0; i < iSize; i++) { SequenceI seq = inorder[i]; @@ -316,7 +317,7 @@ public class SequenceGroup */ public void addSequence(SequenceI s, boolean recalc) { - if (!sequences.contains(s)) + if (s!=null && !sequences.contains(s)) { sequences.addElement(s); } -- 1.7.10.2