Check on null consensus
authoramwaterhouse <Andrew Waterhouse>
Tue, 10 Oct 2006 14:08:47 +0000 (14:08 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 10 Oct 2006 14:08:47 +0000 (14:08 +0000)
src/jalview/schemes/PIDColourScheme.java

index e09745a..7f4bebe 100755 (executable)
@@ -44,6 +44,11 @@ public class PIDColourScheme
       s = String.valueOf(res -= ('a' - 'A'));\r
     }\r
 \r
+    if (consensus == null ||\r
+        j >= consensus.length)\r
+    {\r
+      return Color.white;\r
+    }\r
 \r
     if ( (threshold != 0) && !aboveThreshold(s, j))\r
     {\r