summaryrefslogtreecommitdiffstats
path: root/server/src
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2012-09-05 11:45:11 +0300
committerJohn Ahlroos <john@vaadin.com>2012-09-05 11:45:11 +0300
commit8f361a20c50411a152ed678a5727fddf58f55ffb (patch)
tree9d3d4de89132c2df02d4f3fa78a1f857bfe7ac89 /server/src
parent6744d2c1144301f0c36ed45356319117ebea8aae (diff)
parent65240f403416efc82fb5ff9efce682291d426e89 (diff)
downloadvaadin-framework-8f361a20c50411a152ed678a5727fddf58f55ffb.tar.gz
vaadin-framework-8f361a20c50411a152ed678a5727fddf58f55ffb.zip
Merge branch 'master' into layoutgraph
Diffstat (limited to 'server/src')
-rw-r--r--server/src/com/vaadin/Application.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/src/com/vaadin/Application.java b/server/src/com/vaadin/Application.java
index e4e49391bb..9498534b4a 100644
--- a/server/src/com/vaadin/Application.java
+++ b/server/src/com/vaadin/Application.java
@@ -185,6 +185,11 @@ public class Application implements Terminal.ErrorListener, Serializable {
throw new IllegalStateException(
"mainWindow is attached to another application");
}
+ if (UI.getCurrent() == null) {
+ // Assume setting a main window from Application.init if there's
+ // no current UI -> set the main window as the current UI
+ UI.setCurrent(mainWindow);
+ }
this.mainWindow = mainWindow;
}