fixed array index out of bounds when not removing alignment annotation
[jalview.git] / src / jalview / datamodel / Alignment.java
index 9c7f2fb..677f436 100755 (executable)
@@ -489,8 +489,8 @@ public class Alignment
         swap=true;
         continue;
       }
-
-      temp[tIndex++] = annotations[i];
+      if (tIndex<temp.length)
+        temp[tIndex++] = annotations[i];
     }
 
     if (swap)