diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/org/traccar/web/server/model/DataServiceImpl.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/traccar/web/server/model/DataServiceImpl.java b/src/org/traccar/web/server/model/DataServiceImpl.java index fa7a42d8..a1ea80be 100644 --- a/src/org/traccar/web/server/model/DataServiceImpl.java +++ b/src/org/traccar/web/server/model/DataServiceImpl.java @@ -193,7 +193,7 @@ public class DataServiceImpl extends RemoteServiceServlet implements DataService public List<Position> getLatestPositions() { List<Position> positions = new LinkedList<Position>(); User user = getUser(); - if (!user.getDevices().isEmpty()) { + if (user.getDevices() != null && !user.getDevices().isEmpty()) { TypedQuery<Position> query = entityManager.createQuery( "SELECT x FROM Position x WHERE x.id IN (" + "SELECT y.latestPosition FROM Device y WHERE y IN (:devices))", Position.class); |