From: jprocter Date: Thu, 2 Sep 2010 15:59:26 +0000 (+0000) Subject: fix occasional arrayIndexOutOfBounds when sequences in subgroup are shorter than... X-Git-Tag: Release_2_6~73 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=9d31636d87ba5d3243625a1e1b77db45d4fc9584;p=jalview.git fix occasional arrayIndexOutOfBounds when sequences in subgroup are shorter than alignment width --- diff --git a/src/jalview/analysis/AAFrequency.java b/src/jalview/analysis/AAFrequency.java index 46264d6..8fd60c4 100755 --- a/src/jalview/analysis/AAFrequency.java +++ b/src/jalview/analysis/AAFrequency.java @@ -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) {