From: BobHanson Date: Tue, 9 Jun 2020 06:20:53 +0000 (-0500) Subject: JAL-3446 from JAL-3253-applet Tree Canvas bug fix X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=138474a8ee16555ca5f6317450e313258cb57b91;p=jalview.git JAL-3446 from JAL-3253-applet Tree Canvas bug fix - was possible to right-click off the node to get a NullPointer exception. --- 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 } }