From de67a099c57ee0483368de2880771cc1b755db65 Mon Sep 17 00:00:00 2001 From: kjvdheide Date: Mon, 27 Nov 2017 16:47:05 +0000 Subject: [PATCH] JAL-2853 fix small bug where the font of a not yet existing panel is set --- forester/java/src/org/forester/archaeopteryx/TreePanel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ) { -- 1.7.10.2