diff options
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/database/ConnectionManager.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/org/traccar/database/ConnectionManager.java b/src/org/traccar/database/ConnectionManager.java index ae931151d..e03fd1663 100644 --- a/src/org/traccar/database/ConnectionManager.java +++ b/src/org/traccar/database/ConnectionManager.java @@ -81,6 +81,10 @@ public class ConnectionManager { public synchronized void updateDevice(final long deviceId, String status, Date time) { Device device = Context.getIdentityManager().getDeviceById(deviceId); + if (device == null) { + return; + } + device.setStatus(status); if (time != null) { device.setLastUpdate(time); |