Still need to stop system bundle if it is starting. (FELIX-749)


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@789920 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/Felix.java b/framework/src/main/java/org/apache/felix/framework/Felix.java
index 913dc46..f0411b5 100644
--- a/framework/src/main/java/org/apache/felix/framework/Felix.java
+++ b/framework/src/main/java/org/apache/felix/framework/Felix.java
@@ -2002,8 +2002,9 @@
             setBundleStateAndNotify(bundle, Bundle.STOPPING);
             fireBundleEvent(BundleEvent.STOPPING, bundle);
 
-            // If the bundle was active, then invoke the activator stop() method.
-            if (wasActive)
+            // If the bundle was active, then invoke the activator stop() method
+            // or if we are stopping the system bundle.
+            if ((wasActive) || (bundle.getBundleId() == 0))
             {
                 try
                 {