diff --git a/plugins/org.eclipse.emf.parsley.runtime.common/src/org/eclipse/emf/parsley/runtime/ui/PluginUtil.java b/plugins/org.eclipse.emf.parsley.runtime.common/src/org/eclipse/emf/parsley/runtime/ui/PluginUtil.java index 72bcf33cc..0d4ef29f6 100644 --- a/plugins/org.eclipse.emf.parsley.runtime.common/src/org/eclipse/emf/parsley/runtime/ui/PluginUtil.java +++ b/plugins/org.eclipse.emf.parsley.runtime.common/src/org/eclipse/emf/parsley/runtime/ui/PluginUtil.java @@ -39,13 +39,17 @@ public static Bundle getBundle(Class classFromBundle) { /** * Retrieves the {@link AbstractUIPlugin} activator from the specified {@link Bundle}, * via reflection, assuming that the activator has a static method getDefault returning - * the singleton instance. + * the singleton instance. If the specified {@link Bundle} is null, then it simply + * returns null. * * @param bundle * @return * @throws PluginConfigurationException if bundle is not found or if it doesn't contain the getDefault method */ public static AbstractUIPlugin getPlugin(Bundle bundle){ + if (bundle == null) { + return null; + } final Dictionary headers = bundle.getHeaders(); String activator = headers.get(Constants.BUNDLE_ACTIVATOR); Class activatorClass;