JAL-845 handle no profile without NPE!
[jalview.git] / src / jalview / renderer / AnnotationRenderer.java
index 2e40416..1d1010f 100644 (file)
@@ -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;