Fix potential NPE on startup

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@907611 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole-plugins/event/src/main/java/org/apache/felix/webconsole/plugins/event/internal/OptionalFeaturesHandler.java b/webconsole-plugins/event/src/main/java/org/apache/felix/webconsole/plugins/event/internal/OptionalFeaturesHandler.java
index b4b0c56..e951123 100644
--- a/webconsole-plugins/event/src/main/java/org/apache/felix/webconsole/plugins/event/internal/OptionalFeaturesHandler.java
+++ b/webconsole-plugins/event/src/main/java/org/apache/felix/webconsole/plugins/event/internal/OptionalFeaturesHandler.java
@@ -73,7 +73,7 @@
         final ServiceReference cfaRef = this.bundleContext.getServiceReference(CONFIGURATION_ADMIN_CLASS_NAME);
         if ( cfaRef != null )
         {
-            final Long id = (Long)ref.getProperty(Constants.SERVICE_ID);
+            final Long id = (Long)cfaRef.getProperty(Constants.SERVICE_ID);
             bindConfigAdmin(id);
         }
 
@@ -115,7 +115,7 @@
                             public void run()
                             {
                                 try {
-                                    Thread.sleep(50);
+                                    Thread.sleep(500);
                                 } catch (InterruptedException ignore) {}
                                 bindEventAdmin(id);
                             }
@@ -128,7 +128,7 @@
                             public void run()
                             {
                                 try {
-                                    Thread.sleep(50);
+                                    Thread.sleep(500);
                                 } catch (InterruptedException ignore) {}
                                 unbindEventAdmin(id);
                             }
@@ -145,7 +145,7 @@
                             public void run()
                             {
                                 try {
-                                    Thread.sleep(50);
+                                    Thread.sleep(500);
                                 } catch (InterruptedException ignore) {}
                                 bindConfigAdmin(id);
                             }
@@ -158,7 +158,7 @@
                             public void run()
                             {
                                 try {
-                                    Thread.sleep(50);
+                                    Thread.sleep(500);
                                 } catch (InterruptedException ignore) {}
                                 unbindConfigAdmin(id);
                             }