summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-09-04 15:48:07 +0300
committerLeif Åstrand <leif@vaadin.com>2012-09-04 15:48:07 +0300
commite810fed27a55b9ea888b29658e52329a06698322 (patch)
tree485d5f816cda6441174bb231c00a0e130e3cfad5 /server
parentf6b3c140e77c2f27010117ab8bb3876fe492fb2f (diff)
downloadvaadin-framework-e810fed27a55b9ea888b29658e52329a06698322.tar.gz
vaadin-framework-e810fed27a55b9ea888b29658e52329a06698322.zip
Do detach() before clearing application (#9419)
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/ui/UI.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/src/com/vaadin/ui/UI.java b/server/src/com/vaadin/ui/UI.java
index 4b861d7a25..ee4cb9fd2c 100644
--- a/server/src/com/vaadin/ui/UI.java
+++ b/server/src/com/vaadin/ui/UI.java
@@ -691,13 +691,14 @@ public abstract class UI extends AbstractComponentContainer implements
if ((application == null) == (this.application == null)) {
throw new IllegalStateException("Application has already been set");
} else {
+ if (application == null) {
+ detach();
+ }
this.application = application;
}
if (application != null) {
attach();
- } else {
- detach();
}
}