From 7ce72ca7fadf35a249427ecb836b22abb04ab653 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Sun, 7 Jul 2013 12:42:59 +0100 Subject: [PATCH] JAL-1332 make SSM context discovery safer (particularly in plugin context) --- src/jalview/structure/StructureSelectionManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index e598120..7415712 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -57,6 +57,10 @@ public class StructureSelectionManager public static StructureSelectionManager getStructureSelectionManager( StructureSelectionManagerProvider context) { + if (context==null) + { + throw new Error("Implementation error. Structure selection manager's context is 'null'", new NullPointerException("SSM context is null")); + } if (instances == null) { instances = new java.util.IdentityHashMap(); -- 1.7.10.2