X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FPIDColourScheme.java;h=9bd092e6be7f96f9a56370ee33bfd210e685e22d;hb=d587f1aa61946dc14f6f089cf1dc2a3116cfb773;hp=7f4bebeae89016568d89bbe635c565f09fc6a1fe;hpb=0bdaa0deb6ee514912d2ed730e19f618bc44cb69;p=jalview.git diff --git a/src/jalview/schemes/PIDColourScheme.java b/src/jalview/schemes/PIDColourScheme.java index 7f4bebe..9bd092e 100755 --- a/src/jalview/schemes/PIDColourScheme.java +++ b/src/jalview/schemes/PIDColourScheme.java @@ -44,8 +44,9 @@ public class PIDColourScheme s = String.valueOf(res -= ('a' - 'A')); } - if (consensus == null || - j >= consensus.length) + if (consensus == null + || j >= consensus.length + || consensus[j]==null) { return Color.white; } @@ -55,7 +56,7 @@ public class PIDColourScheme return Color.white; } - currentColour = Color.white; + Color currentColour = Color.white; double sc = 0; @@ -82,7 +83,7 @@ public class PIDColourScheme } if(conservationColouring) - applyConservation(j); + currentColour = applyConservation(currentColour, j); return currentColour; }