From fa4215999ef38879ac72540c44e46ca39858a20b Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 7 Jul 2015 14:08:56 +1200 Subject: Fix filter handler tests (fix #1291) --- src/org/traccar/FilterHandler.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/org/traccar') 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) { -- cgit v1.2.3