From: jprocter Date: Thu, 3 Nov 2011 17:23:44 +0000 (+0000) Subject: ensure we have valid fontMetrics - (NPE was raised when wrap mode enabled on view... X-Git-Tag: Jalview_2_9~564^2~12 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=9eeb330290cb6227c1774b5a51ae1981a6187141;p=jalview.git ensure we have valid fontMetrics - (NPE was raised when wrap mode enabled on view in application otherwise) --- diff --git a/src/jalview/renderer/AnnotationRenderer.java b/src/jalview/renderer/AnnotationRenderer.java index 0d7d4ca..d063c5b 100644 --- a/src/jalview/renderer/AnnotationRenderer.java +++ b/src/jalview/renderer/AnnotationRenderer.java @@ -203,6 +203,7 @@ public class AnnotationRenderer // NOTES: // AnnotationPanel needs to implement: ImageObserver, access to AlignViewport updateFromAwtRenderPanel(annotPanel, av); + fm = g.getFontMetrics(); AlignmentAnnotation[] aa = av.getAlignment().getAlignmentAnnotation(); int x = 0, y = 0;