From: Jim Procter Date: Mon, 21 Apr 2014 09:07:24 +0000 (+0100) Subject: avoid potential NPE X-Git-Tag: Jalview_2_9~123^2~29 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=e21e6d438e301aefb7dfe4c10361beec8e4a9f78;p=jalview.git avoid potential NPE --- diff --git a/src/jalview/schemes/AnnotationColourGradient.java b/src/jalview/schemes/AnnotationColourGradient.java index 1b23d13..d92bb46 100755 --- a/src/jalview/schemes/AnnotationColourGradient.java +++ b/src/jalview/schemes/AnnotationColourGradient.java @@ -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) {