From b513684c725997c77341f30ce4e584cf9f7cdfed Mon Sep 17 00:00:00 2001 From: hansonr Date: Sun, 22 Jul 2018 17:27:03 -0500 Subject: [PATCH] allows for null Jmol viewer --- src/jalview/ext/jmol/JalviewJmolBinding.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); -- 1.7.10.2