JAL-1254 patch for NPE in annotation renderer when no annotations shown in alignment.
authorjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 18 Jan 2013 07:51:31 +0000 (07:51 +0000)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 18 Jan 2013 07:51:31 +0000 (07:51 +0000)
src/jalview/renderer/AnnotationRenderer.java

index 7ab7fda..ab27d8a 100644 (file)
@@ -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;