patch for npe that occurs for importing Jalview projects where group conservation...
authorjprocter <Jim Procter>
Tue, 29 Jun 2010 15:21:16 +0000 (15:21 +0000)
committerjprocter <Jim Procter>
Tue, 29 Jun 2010 15:21:16 +0000 (15:21 +0000)
src/jalview/analysis/AAFrequency.java

index bc178df..46264d6 100755 (executable)
@@ -204,6 +204,11 @@ public class AAFrequency
           boolean includeAllConsSymbols, char[] alphabet)
   {
     float tval, value;
+    if (consensus==null || consensus.annotations==null || consensus.annotations.length<width)
+    {
+      // called with a bad alignment annotation row - wait for it to be initialised properly
+      return;
+    }
     for (int i = iStart; i < width; i++)
     {
       value = 0;