From: gmungoc Date: Wed, 17 Jun 2015 07:49:34 +0000 (+0100) Subject: JAL-1778 reinstated this.ssm to handle 'close all windows' robustly X-Git-Tag: Release_2_10_0~607 X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=0f26441e26325c728a3e9a108ac425d4d60dde1c JAL-1778 reinstated this.ssm to handle 'close all windows' robustly --- diff --git a/src/jalview/gui/AppVarna.java b/src/jalview/gui/AppVarna.java index 35cd3e5..5c3785a 100644 --- a/src/jalview/gui/AppVarna.java +++ b/src/jalview/gui/AppVarna.java @@ -463,14 +463,10 @@ public class AppVarna extends JInternalFrame implements /* * Deregister as a listener, to free references to this object */ - if (ap != null) + if (ssm != null) { - StructureSelectionManager ssm = ap.getStructureSelectionManager(); - if (ssm != null) - { - ssm.removeStructureViewerListener(AppVarna.this, null); - ssm.removeSelectionListener(AppVarna.this); - } + ssm.removeStructureViewerListener(AppVarna.this, null); + ssm.removeSelectionListener(AppVarna.this); } }