aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/com
diff options
context:
space:
mode:
authorJuuso Valli <juuso@vaadin.com>2014-04-16 14:47:32 +0300
committerVaadin Code Review <review@vaadin.com>2014-04-23 13:37:18 +0000
commit2e58e97e5297c0e0c718df52ba1c4b30742f3c03 (patch)
treeddad512e4de546448e08e3c5c7785a50966e0b99 /server/src/com
parenteeb956bc645a9c2aa3714747b7889e40bcca4d5f (diff)
downloadvaadin-framework-2e58e97e5297c0e0c718df52ba1c4b30742f3c03.tar.gz
vaadin-framework-2e58e97e5297c0e0c718df52ba1c4b30742f3c03.zip
Fix findUI throwing NullPointerException when extending Vaadin (#13556)
findUI sometimes threw a NPE when the session wasn't set but the UI ID was. Doesn't occur in normal use, just when doing custom things with requestStart/requestEnd or runPendingAccessTasks Change-Id: Id7733567923fa30dcab4946c43b73200c2a0fac2
Diffstat (limited to 'server/src/com')
-rw-r--r--server/src/com/vaadin/server/VaadinService.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/com/vaadin/server/VaadinService.java b/server/src/com/vaadin/server/VaadinService.java
index b96e284e6e..ce9badaf98 100644
--- a/server/src/com/vaadin/server/VaadinService.java
+++ b/server/src/com/vaadin/server/VaadinService.java
@@ -982,7 +982,7 @@ public abstract class VaadinService implements Serializable {
// Get UI id from the request
String uiIdString = request.getParameter(UIConstants.UI_ID_PARAMETER);
UI ui = null;
- if (uiIdString != null) {
+ if (uiIdString != null && session != null) {
int uiId = Integer.parseInt(uiIdString);
ui = session.getUIById(uiId);
}