From: Jim Procter Date: Sun, 6 Apr 2014 11:29:11 +0000 (+0100) Subject: fix for JAL-1464 avoid NPE with per-sequence annotation with no positional elements... X-Git-Tag: Release_2_8_1~4^2~21 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=016d1be5e9ed6c81e6d0bc654f77dba192b9b05f;p=jalview.git fix for JAL-1464 avoid NPE with per-sequence annotation with no positional elements as generated by 'extract scores' (related to JAL-1066) --- 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)) {