aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/FilterHandler.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/FilterHandler.java b/src/org/traccar/FilterHandler.java
index 69f9a55b1..9b80afec5 100644
--- a/src/org/traccar/FilterHandler.java
+++ b/src/org/traccar/FilterHandler.java
@@ -67,7 +67,10 @@ public class FilterHandler extends OneToOneDecoder {
}
private Position getLastPosition(long deviceId) {
- return Context.getConnectionManager().getLastPosition(deviceId);
+ if (Context.getConnectionManager() != null) {
+ return Context.getConnectionManager().getLastPosition(deviceId);
+ }
+ return null;
}
private boolean filterInvalid(Position position) {