From: hansonr Date: Sun, 22 Jul 2018 22:27:03 +0000 (-0500) Subject: allows for null Jmol viewer X-Git-Tag: Release_2_11_4_0~45^2~18^2~513 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b513684c725997c77341f30ce4e584cf9f7cdfed;p=jalview.git allows for null Jmol viewer --- diff --git a/src/jalview/ext/jmol/JalviewJmolBinding.java b/src/jalview/ext/jmol/JalviewJmolBinding.java index 8832278..258d806 100644 --- a/src/jalview/ext/jmol/JalviewJmolBinding.java +++ b/src/jalview/ext/jmol/JalviewJmolBinding.java @@ -166,7 +166,8 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel { // remove listeners for all structures in viewer getSsm().removeStructureViewerListener(this, this.getStructureFiles()); - viewer.dispose(); + if (viewer != null) + viewer.dispose(); lastCommand = null; viewer = null; releaseUIResources();