aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/web
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/web')
-rw-r--r--src/org/traccar/web/server/model/DataServiceImpl.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/web/server/model/DataServiceImpl.java b/src/org/traccar/web/server/model/DataServiceImpl.java
index eb466694..c2ebce15 100644
--- a/src/org/traccar/web/server/model/DataServiceImpl.java
+++ b/src/org/traccar/web/server/model/DataServiceImpl.java
@@ -108,7 +108,11 @@ public class DataServiceImpl extends RemoteServiceServlet implements DataService
private User getSessionUser() {
HttpSession session = getThreadLocalRequest().getSession();
- return (User) session.getAttribute(ATTRIBUTE_USER);
+ User user = (User) session.getAttribute(ATTRIBUTE_USER);
+ if (user == null) {
+ throw new IllegalStateException();
+ }
+ return user;
}
@Override