aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-07-03 19:08:26 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2016-07-03 19:08:26 +1200
commitdbb2e88db2c5af22172ea3642b27899b8164b40a (patch)
treef678e2dd66f03490654f4de80083982e80385e8c
parent6606ad80f189da772687c6092618b19a46f83394 (diff)
downloadtrackermap-server-dbb2e88db2c5af22172ea3642b27899b8164b40a.tar.gz
trackermap-server-dbb2e88db2c5af22172ea3642b27899b8164b40a.tar.bz2
trackermap-server-dbb2e88db2c5af22172ea3642b27899b8164b40a.zip
Fix crash issue on startup
-rw-r--r--src/org/traccar/database/GeofenceManager.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/traccar/database/GeofenceManager.java b/src/org/traccar/database/GeofenceManager.java
index 3f4d4c5ce..cc9f82879 100644
--- a/src/org/traccar/database/GeofenceManager.java
+++ b/src/org/traccar/database/GeofenceManager.java
@@ -150,7 +150,7 @@ public class GeofenceManager {
deviceGeofenceIds.clear();
}
Position lastPosition = Context.getConnectionManager().getLastPosition(device.getId());
- if (lastPosition != null) {
+ if (lastPosition != null && deviceGeofencesWithGroups.containsKey(device.getId())) {
for (Long geofenceId : deviceGeofencesWithGroups.get(device.getId())) {
if (getGeofence(geofenceId).getGeometry()
.containsPoint(lastPosition.getLatitude(), lastPosition.getLongitude())) {