Make initialisation more robust.
[lgpl/argeo-commons.git] / org.argeo.cms.ui / src / org / argeo / cms / web / CmsWebApp.java
index 687b54a83dab44a8eb2b15daca10a4820d6fb0cb..70d3917d48813edbb82b7a2365f98a0215890e25 100644 (file)
@@ -32,11 +32,14 @@ public class CmsWebApp implements ApplicationConfiguration, CmsAppListener {
        public void init(BundleContext bundleContext, Map<String, String> properties) {
                this.bundleContext = bundleContext;
                contextName = properties.get(CONTEXT_NAME);
+               if (cmsApp != null)
+                       themingUpdated();
 //             registerIfAllThemesAvailable();
        }
 
        public void destroy(BundleContext bundleContext, Map<String, String> properties) {
-
+               if (cmsApp != null)
+                       cmsApp.removeCmsAppListener(this);
        }
 
        @Override