aboutsummaryrefslogtreecommitdiff
path: root/src
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
parent7e4ba0f57de50ddd5150f6553b51af040f2a420e (diff)
downloadtrackermap-server-fa4215999ef38879ac72540c44e46ca39858a20b.tar.gz
trackermap-server-fa4215999ef38879ac72540c44e46ca39858a20b.tar.bz2
trackermap-server-fa4215999ef38879ac72540c44e46ca39858a20b.zip
Fix filter handler tests (fix #1291)
Diffstat (limited to 'src')
-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) {