From b4c5fa923c49731469265b2be25d49c90d934b0a Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Fri, 21 Jan 2005 18:29:07 +0000 Subject: [PATCH] Check if graphics is null in labelSize --- src/jalview/gui/IdCanvas.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/jalview/gui/IdCanvas.java b/src/jalview/gui/IdCanvas.java index 6d4a5b9..1bf5cc6 100755 --- a/src/jalview/gui/IdCanvas.java +++ b/src/jalview/gui/IdCanvas.java @@ -158,6 +158,8 @@ public class IdCanvas extends JPanel public Dimension getLabelWidth() { + if(getGraphics()==null) + return null; FontMetrics fm = this.getGraphics().getFontMetrics(av.font); AlignmentI al = av.getAlignment(); -- 1.7.10.2