From 15f308b25f41681924975f6e4c7d564ebe31263e Mon Sep 17 00:00:00 2001 From: gmungoc Date: Wed, 11 Mar 2015 08:45:01 +0000 Subject: [PATCH] JAL-845 handle no profile without NPE! --- src/jalview/renderer/AnnotationRenderer.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/jalview/renderer/AnnotationRenderer.java b/src/jalview/renderer/AnnotationRenderer.java index 2e40416..1d1010f 100644 --- a/src/jalview/renderer/AnnotationRenderer.java +++ b/src/jalview/renderer/AnnotationRenderer.java @@ -1335,12 +1335,11 @@ public class AnnotationRenderer */ int profl[] = getProfileFor(_aa, column); - boolean isStructureProfile = profl[0] == AlignmentAnnotation.STRUCTURE_PROFILE; - boolean isCdnaProfile = profl[0] == AlignmentAnnotation.CDNA_PROFILE; - // just try to draw the logo if profl is not null if (profl != null && profl[2] != 0) { + boolean isStructureProfile = profl[0] == AlignmentAnnotation.STRUCTURE_PROFILE; + boolean isCdnaProfile = profl[0] == AlignmentAnnotation.CDNA_PROFILE; float ht = normaliseProfile ? y - _aa.graphHeight : y1; double htn = normaliseProfile ? _aa.graphHeight : (y2 - y1);// aa.graphHeight; double hght; -- 1.7.10.2