From 8c6e707d6d9b1b8ad6385eb7eeef0bc78cb46f6e Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Wed, 6 Jul 2005 12:21:25 +0000 Subject: [PATCH] Remove group if sequences are null --- src/jalview/datamodel/Alignment.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/jalview/datamodel/Alignment.java b/src/jalview/datamodel/Alignment.java index 28849b6..61735ee 100755 --- a/src/jalview/datamodel/Alignment.java +++ b/src/jalview/datamodel/Alignment.java @@ -334,9 +334,16 @@ public class Alignment implements AlignmentI { Vector temp = new Vector(); - for (int i = 0; i < this.groups.size(); i++) + int gSize = groups.size(); + for (int i = 0; i < gSize; i++) { SequenceGroup sg = (SequenceGroup) groups.elementAt(i); + if(sg==null || sg.sequences==null) + { + this.deleteGroup(sg); + gSize--; + continue; + } if (sg.sequences.contains(s)) { -- 1.7.10.2