aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-07-07 14:08:56 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-07-07 14:08:56 +1200
commitfa4215999ef38879ac72540c44e46ca39858a20b (patch)
treecaaff3a4298a9eaa8eb956a9dfe940fe028004a6 /src/org/traccar
parent7e4ba0f57de50ddd5150f6553b51af040f2a420e (diff)
downloadtraccar-server-fa4215999ef38879ac72540c44e46ca39858a20b.tar.gz
traccar-server-fa4215999ef38879ac72540c44e46ca39858a20b.tar.bz2
traccar-server-fa4215999ef38879ac72540c44e46ca39858a20b.zip
Fix filter handler tests (fix #1291)
Diffstat (limited to 'src/org/traccar')
-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) {