avoid potential NPE
[jalview.git] / src / jalview / schemes / AnnotationColourGradient.java
index 1b23d13..d92bb46 100755 (executable)
@@ -199,7 +199,7 @@ public class AnnotationColourGradient extends ResidueColourScheme
   public Color findColour(char c, int j, SequenceI seq)
   {
     Color currentColour = Color.white;
-    AlignmentAnnotation annotation = (seqAssociated ? seqannot.get(seq)
+    AlignmentAnnotation annotation = (seqAssociated && seqannot!=null ? seqannot.get(seq)
             : this.annotation);
     if (annotation == null)
     {