avoid potential NPE
authorJim Procter <jprocter@dundee.ac.uk>
Mon, 21 Apr 2014 09:07:24 +0000 (10:07 +0100)
committerJim Procter <jprocter@dundee.ac.uk>
Mon, 21 Apr 2014 13:11:39 +0000 (14:11 +0100)
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)
     {