JAL-1755 fix for NPE when setting up temporary variables
[jalview.git] / 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)
         {