From 204b0a020a4bd2c3d17754ba183c39ea3035e0ae Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 6 Apr 2024 15:46:24 -0700 Subject: Handle null in post processor --- src/main/java/org/traccar/handler/PostProcessHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/org/traccar/handler') diff --git a/src/main/java/org/traccar/handler/PostProcessHandler.java b/src/main/java/org/traccar/handler/PostProcessHandler.java index 2d6bc03ad..e1d833e46 100644 --- a/src/main/java/org/traccar/handler/PostProcessHandler.java +++ b/src/main/java/org/traccar/handler/PostProcessHandler.java @@ -47,7 +47,7 @@ public class PostProcessHandler extends BasePositionHandler { @Override public void handlePosition(Position position, Callback callback) { try { - if (PositionUtil.isLatest(cacheManager, position)) { + if (position != null && PositionUtil.isLatest(cacheManager, position)) { Device updatedDevice = new Device(); updatedDevice.setId(position.getDeviceId()); updatedDevice.setPositionId(position.getId()); -- cgit v1.2.3