From 0bdaa0deb6ee514912d2ed730e19f618bc44cb69 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Tue, 10 Oct 2006 14:08:47 +0000 Subject: [PATCH] Check on null consensus --- src/jalview/schemes/PIDColourScheme.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/jalview/schemes/PIDColourScheme.java b/src/jalview/schemes/PIDColourScheme.java index e09745a..7f4bebe 100755 --- a/src/jalview/schemes/PIDColourScheme.java +++ b/src/jalview/schemes/PIDColourScheme.java @@ -44,6 +44,11 @@ public class PIDColourScheme s = String.valueOf(res -= ('a' - 'A')); } + if (consensus == null || + j >= consensus.length) + { + return Color.white; + } if ( (threshold != 0) && !aboveThreshold(s, j)) { -- 1.7.10.2