diff options
Diffstat (limited to 'bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/Activator.java')
-rw-r--r-- | bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/Activator.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/Activator.java b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/Activator.java index 19a35eb58..355ba8adf 100644 --- a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/Activator.java +++ b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/Activator.java @@ -315,6 +315,10 @@ public class Activator implements BundleActivator { * find one. */ public static URLConverter getURLConverter(URL url) { + BundleContext ctx = getContext(); + if (url == null || ctx == null) { + return null; + } String protocol = url.getProtocol(); synchronized (urlTrackers) { ServiceTracker<Object, URLConverter> tracker = urlTrackers.get(protocol); @@ -324,7 +328,7 @@ public class Activator implements BundleActivator { String FILTER_POSTFIX = "))"; //$NON-NLS-1$ Filter filter = null; try { - filter = getContext().createFilter(FILTER_PREFIX + protocol + FILTER_POSTFIX); + filter = ctx.createFilter(FILTER_PREFIX + protocol + FILTER_POSTFIX); } catch (InvalidSyntaxException e) { return null; } |