fix for JAL-1464 avoid NPE with per-sequence annotation with no positional elements...
authorJim Procter <jprocter@dundee.ac.uk>
Sun, 6 Apr 2014 11:29:11 +0000 (12:29 +0100)
committerJim Procter <jprocter@dundee.ac.uk>
Sun, 6 Apr 2014 11:29:11 +0000 (12:29 +0100)
src/jalview/schemes/AnnotationColourGradient.java

index 8ca4420..1b23d13 100755 (executable)
@@ -207,7 +207,7 @@ public class AnnotationColourGradient extends ResidueColourScheme
     }
     if ((threshold == 0) || aboveThreshold(c, j))
     {
     }
     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))
       {
               && annotation.annotations[j] != null
               && !jalview.util.Comparison.isGap(c))
       {