From 138474a8ee16555ca5f6317450e313258cb57b91 Mon Sep 17 00:00:00 2001 From: BobHanson Date: Tue, 9 Jun 2020 01:20:53 -0500 Subject: [PATCH] JAL-3446 from JAL-3253-applet Tree Canvas bug fix - was possible to right-click off the node to get a NullPointer exception. --- src/jalview/gui/TreeCanvas.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/jalview/gui/TreeCanvas.java b/src/jalview/gui/TreeCanvas.java index 29ba52b..e59dfcc 100755 --- a/src/jalview/gui/TreeCanvas.java +++ b/src/jalview/gui/TreeCanvas.java @@ -761,7 +761,9 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, */ if (e.isPopupTrigger()) { - chooseSubtreeColour(); + if (highlightNode != null) { + chooseSubtreeColour(); + } e.consume(); // prevent mouseClicked happening } } -- 1.7.10.2