From: Jim Procter Date: Fri, 29 May 2015 13:22:38 +0000 (+0100) Subject: JAL-1755 fix for NPE when setting up temporary variables X-Git-Tag: Jalview_2_9~21^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=797f8de3bc7ec7f84ac643bb1d961eae1a0b0824;p=jalview.git JAL-1755 fix for NPE when setting up temporary variables --- diff --git a/src/jalview/analysis/AAFrequency.java b/src/jalview/analysis/AAFrequency.java index d6088e4..69c39df 100755 --- a/src/jalview/analysis/AAFrequency.java +++ b/src/jalview/analysis/AAFrequency.java @@ -311,12 +311,12 @@ public class AAFrequency mouseOver.append(hci.get(AAFrequency.MAXRESIDUE) + " "); } int[][] profile = (int[][]) hci.get(AAFrequency.PROFILE); - int sequenceCount = profile[1][0]; - int nonGappedCount = profile[1][1]; - int normalisedBy = ignoreGapsInConsensusCalculation ? nonGappedCount - : sequenceCount; if (profile != null && includeAllConsSymbols) { + int sequenceCount = profile[1][0]; + int nonGappedCount = profile[1][1]; + int normalisedBy = ignoreGapsInConsensusCalculation ? nonGappedCount + : sequenceCount; mouseOver.setLength(0); if (alphabet != null) {