From: Jim Procter Date: Thu, 1 May 2014 14:41:20 +0000 (+0100) Subject: JAL-1492 formatting and squash NPEs X-Git-Tag: Jalview_2_9~190^2~6 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=a82fbafb34572f4897f4ae2b57444f772f4a7a8b;p=jalview.git JAL-1492 formatting and squash NPEs --- 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); + } } } }