diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-07-07 14:08:56 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-07-07 14:08:56 +1200 |
commit | fa4215999ef38879ac72540c44e46ca39858a20b (patch) | |
tree | caaff3a4298a9eaa8eb956a9dfe940fe028004a6 /src/org/traccar | |
parent | 7e4ba0f57de50ddd5150f6553b51af040f2a420e (diff) | |
download | trackermap-server-fa4215999ef38879ac72540c44e46ca39858a20b.tar.gz trackermap-server-fa4215999ef38879ac72540c44e46ca39858a20b.tar.bz2 trackermap-server-fa4215999ef38879ac72540c44e46ca39858a20b.zip |
Fix filter handler tests (fix #1291)
Diffstat (limited to 'src/org/traccar')
-rw-r--r-- | src/org/traccar/FilterHandler.java | 5 |
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) { |