Make initialisation more robust.
authorMathieu Baudier <mbaudier@argeo.org>
Wed, 7 Oct 2020 09:16:31 +0000 (11:16 +0200)
committerMathieu Baudier <mbaudier@argeo.org>
Wed, 7 Oct 2020 09:16:31 +0000 (11:16 +0200)
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