From cad3601db6cacc090783f7e53dafcc71717cb196 Mon Sep 17 00:00:00 2001 From: Jed Date: Tue, 9 Sep 2014 13:41:28 +0800 Subject: Added null check for lastPostition --- src/org/traccar/TrackerEventHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/org/traccar') diff --git a/src/org/traccar/TrackerEventHandler.java b/src/org/traccar/TrackerEventHandler.java index f7858fea4..5387074dc 100644 --- a/src/org/traccar/TrackerEventHandler.java +++ b/src/org/traccar/TrackerEventHandler.java @@ -75,7 +75,7 @@ public class TrackerEventHandler extends IdleStateAwareChannelHandler { lastPostition = position; } } - if (id != null) { + if (id != null && lastPostition != null) { try { dataManager.updateLatestPosition(lastPostition, id); } catch (Exception error) { -- cgit v1.2.3