From: amwaterhouse Date: Fri, 21 Jan 2005 18:29:07 +0000 (+0000) Subject: Check if graphics is null in labelSize X-Git-Tag: Release_2_0~743 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b4c5fa923c49731469265b2be25d49c90d934b0a;p=jalview.git Check if graphics is null in labelSize --- 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();