For resource loading we won't always have a class loader, so we
need to check for that case. (FELIX-1193)


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@809619 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java b/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java
index 581cdb6..61d3cf0 100644
--- a/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java
+++ b/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java
@@ -820,7 +820,8 @@
             try
             {
                 // Get the appropriate class loader for delegation.
-                ClassLoader parent = m_classLoader.getParent();
+                ClassLoader parent = (m_classLoader == null)
+                    ? determineParentClassLoader() : m_classLoader.getParent();
                 parent = (parent == null) ? m_bootClassLoader : parent;
                 urls = parent.getResources(name);
             }