From 18b27ea838aeaca9964a46c9b833a47fbb372d3b Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Tue, 20 Sep 2005 13:13:07 +0000 Subject: [PATCH] Make sure fontmetrics is not null --- src/jalview/gui/AnnotationPanel.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/jalview/gui/AnnotationPanel.java b/src/jalview/gui/AnnotationPanel.java index 15bc284..bc14d66 100755 --- a/src/jalview/gui/AnnotationPanel.java +++ b/src/jalview/gui/AnnotationPanel.java @@ -608,6 +608,9 @@ public class AnnotationPanel extends JPanel implements MouseListener, */ public void drawComponent(Graphics2D g, int startRes, int endRes) { + if (fm == null) + fm = g.getFontMetrics(); + if(fm==null) fm = g.getFontMetrics(); -- 1.7.10.2