Merge branch 'docs/2_8_1_Release' into Release_2_8_1_Branch
[jalview.git] / src / jalview / datamodel / SequenceGroup.java
index 1df45a2..a01c0a5 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * This file is part of Jalview.
@@ -1209,11 +1209,15 @@ public class SequenceGroup implements AnnotatedCollectionI
     ArrayList<AlignmentAnnotation> annot = new ArrayList<AlignmentAnnotation>();
     for (SequenceI seq : (Vector<SequenceI>) 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);
+          }
         }
       }
     }