From 016d1be5e9ed6c81e6d0bc654f77dba192b9b05f Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Sun, 6 Apr 2014 12:29:11 +0100 Subject: [PATCH] fix for JAL-1464 avoid NPE with per-sequence annotation with no positional elements as generated by 'extract scores' (related to JAL-1066) --- src/jalview/schemes/AnnotationColourGradient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jalview/schemes/AnnotationColourGradient.java b/src/jalview/schemes/AnnotationColourGradient.java index 8ca4420..1b23d13 100755 --- a/src/jalview/schemes/AnnotationColourGradient.java +++ b/src/jalview/schemes/AnnotationColourGradient.java @@ -207,7 +207,7 @@ public class AnnotationColourGradient extends ResidueColourScheme } if ((threshold == 0) || aboveThreshold(c, j)) { - if (j < annotation.annotations.length + if (annotation.annotations!=null && j < annotation.annotations.length && annotation.annotations[j] != null && !jalview.util.Comparison.isGap(c)) { -- 1.7.10.2