*/
public static void release(StructureSelectionManagerProvider jalviewLite)
{
- StructureSelectionManager mnger=(instances.get(jalviewLite));
- if (mnger!=null)
+// synchronized (instances)
{
- instances.remove(jalviewLite);
- try {
- mnger.finalize();
- } catch (Throwable x){};
+ if (instances == null)
+ {
+ return;
+ }
+ StructureSelectionManager mnger = (instances.get(jalviewLite));
+ if (mnger != null)
+ {
+ instances.remove(jalviewLite);
+ try
+ {
+ mnger.finalize();
+ } catch (Throwable x)
+ {
+ }
+ ;
+ }
}
}