aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/BaseDataHandler.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/BaseDataHandler.java b/src/org/traccar/BaseDataHandler.java
index 8a461cc19..48794b0d7 100644
--- a/src/org/traccar/BaseDataHandler.java
+++ b/src/org/traccar/BaseDataHandler.java
@@ -24,7 +24,10 @@ public abstract class BaseDataHandler extends ChannelInboundHandlerAdapter {
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
if (msg instanceof Position) {
- ctx.fireChannelRead(handlePosition((Position) msg));
+ Position position = handlePosition((Position) msg);
+ if (position != null) {
+ ctx.fireChannelRead(position);
+ }
} else {
super.channelRead(ctx, msg);
}