allows for null Jmol viewer
authorhansonr <hansonr@STO24954W.ad.stolaf.edu>
Sun, 22 Jul 2018 22:27:03 +0000 (17:27 -0500)
committerhansonr <hansonr@STO24954W.ad.stolaf.edu>
Sun, 22 Jul 2018 22:27:03 +0000 (17:27 -0500)
src/jalview/ext/jmol/JalviewJmolBinding.java

index 8832278..258d806 100644 (file)
@@ -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();