fix occasional arrayIndexOutOfBounds when sequences in subgroup are shorter than...
authorjprocter <Jim Procter>
Thu, 2 Sep 2010 15:59:26 +0000 (15:59 +0000)
committerjprocter <Jim Procter>
Thu, 2 Sep 2010 15:59:26 +0000 (15:59 +0000)
src/jalview/analysis/AAFrequency.java

index 46264d6..8fd60c4 100755 (executable)
@@ -211,6 +211,11 @@ public class AAFrequency
     }
     for (int i = iStart; i < width; i++)
     {
+      if (i>=hconsensus.length) {
+        // happens if sequences calculated over were shorter than alignment width
+        consensus.annotations[i]=null;
+        continue;
+      }
       value = 0;
       if (ignoreGapsInConsensusCalculation)
       {