CurrentColour must not be accessed by multiple sequence renderers
[jalview.git] / src / jalview / schemes / ClustalxColourScheme.java
index 04610ef..ce30de8 100755 (executable)
@@ -247,12 +247,10 @@ public class ClustalxColourScheme
 \r
   public Color findColour(String s, int j)\r
   {\r
-\r
-    if(cons2.length<=j)\r
-      return currentColour;\r
+    Color currentColour;\r
 \r
 \r
-    if ( (threshold != 0) && !aboveThreshold(s, j))\r
+    if ( cons2.length<=j || (threshold != 0 && !aboveThreshold(s, j)))\r
     {\r
       return Color.white;\r
     }\r
@@ -283,7 +281,7 @@ public class ClustalxColourScheme
     }\r
 \r
     if(conservationColouring)\r
-         applyConservation(j);\r
+         applyConservation(currentColour, j);\r
 \r
     return currentColour;\r
   }\r