JAL-1755 fix for NPE when setting up temporary variables
authorJim Procter <jprocter@issues.jalview.org>
Fri, 29 May 2015 13:22:38 +0000 (14:22 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Fri, 29 May 2015 13:22:38 +0000 (14:22 +0100)
src/jalview/analysis/AAFrequency.java

index d6088e4..69c39df 100755 (executable)
@@ -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)
         {