Tested filter for null before using it.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@910579 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/BundleDependencyImpl.java b/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/BundleDependencyImpl.java
index 8bb09b9..12b6332 100644
--- a/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/BundleDependencyImpl.java
+++ b/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/BundleDependencyImpl.java
@@ -393,7 +393,12 @@
             Bundle[] bundles = m_context.getBundles();
             for (int i = 0; i < bundles.length; i++) {
                 if ((bundles[i].getState() & m_stateMask) > 0) {
-                    if (m_filter.match(bundles[i].getHeaders())) {
+                    Filter filter = m_filter;
+                    if (filter == null) {
+                        service = bundles[i];
+                        break;
+                    }
+                    else if (filter.match(bundles[i].getHeaders())) {
                         service = bundles[i];
                         break;
                     }