From ca03475c238445cb80495c117fee9e508d5f6985 Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 18 Jan 2013 07:51:31 +0000 Subject: [PATCH] JAL-1254 patch for NPE in annotation renderer when no annotations shown in alignment. --- src/jalview/renderer/AnnotationRenderer.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/jalview/renderer/AnnotationRenderer.java b/src/jalview/renderer/AnnotationRenderer.java index 7ab7fda..ab27d8a 100644 --- a/src/jalview/renderer/AnnotationRenderer.java +++ b/src/jalview/renderer/AnnotationRenderer.java @@ -257,7 +257,10 @@ public class AnnotationRenderer updateFromAwtRenderPanel(annotPanel, av); fm = g.getFontMetrics(); AlignmentAnnotation[] aa = av.getAlignment().getAlignmentAnnotation(); - + if (aa==null) + { + return false; + } int x = 0, y = 0; int column = 0; char lastSS; -- 1.7.10.2