From a82fbafb34572f4897f4ae2b57444f772f4a7a8b Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 1 May 2014 15:41:20 +0100 Subject: [PATCH] JAL-1492 formatting and squash NPEs --- src/jalview/datamodel/SequenceGroup.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/jalview/datamodel/SequenceGroup.java b/src/jalview/datamodel/SequenceGroup.java index 1df45a2..a8b0ace 100755 --- a/src/jalview/datamodel/SequenceGroup.java +++ b/src/jalview/datamodel/SequenceGroup.java @@ -1209,11 +1209,15 @@ public class SequenceGroup implements AnnotatedCollectionI ArrayList annot = new ArrayList(); for (SequenceI seq : (Vector) sequences) { - for (AlignmentAnnotation al : seq.getAnnotation()) + AlignmentAnnotation[] aa = seq.getAnnotation(); + if (aa != null) { - if (al.groupRef == this) + for (AlignmentAnnotation al : aa) { - annot.add(al); + if (al.groupRef == this) + { + annot.add(al); + } } } } -- 1.7.10.2