Make sure fontmetrics is not null
authoramwaterhouse <Andrew Waterhouse>
Tue, 20 Sep 2005 13:13:07 +0000 (13:13 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 20 Sep 2005 13:13:07 +0000 (13:13 +0000)
src/jalview/gui/AnnotationPanel.java

index 15bc284..bc14d66 100755 (executable)
@@ -608,6 +608,9 @@ public class AnnotationPanel extends JPanel implements MouseListener,
      */\r
     public void drawComponent(Graphics2D g, int startRes, int endRes)\r
     {\r
+      if (fm == null)\r
+        fm = g.getFontMetrics();\r
+\r
                if(fm==null)\r
                        fm = g.getFontMetrics();\r
 \r