From: jprocter Date: Fri, 18 Jan 2013 07:51:31 +0000 (+0000) Subject: JAL-1254 patch for NPE in annotation renderer when no annotations shown in alignment. X-Git-Tag: Jalview_2_9~254^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=ca03475c238445cb80495c117fee9e508d5f6985;p=jalview.git JAL-1254 patch for NPE in annotation renderer when no annotations shown in alignment. --- 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;