From: kjvdheide Date: Mon, 27 Nov 2017 16:47:05 +0000 (+0000) Subject: JAL-2853 fix small bug where the font of a not yet existing panel is set X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=de67a099c57ee0483368de2880771cc1b755db65;p=jalview.git JAL-2853 fix small bug where the font of a not yet existing panel is set --- diff --git a/forester/java/src/org/forester/archaeopteryx/TreePanel.java b/forester/java/src/org/forester/archaeopteryx/TreePanel.java index 6321315..65faa81 100644 --- a/forester/java/src/org/forester/archaeopteryx/TreePanel.java +++ b/forester/java/src/org/forester/archaeopteryx/TreePanel.java @@ -4720,7 +4720,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee } boolean use_vis = false; final Graphics2D g = ( Graphics2D ) getGraphics(); - if ( getControlPanel().isUseVisualStyles() ) { + if ( g != null && getControlPanel().isUseVisualStyles() ) { use_vis = setFont( g, node, false ); } if ( !use_vis ) {