diff options
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/protocol/MeitrackProtocolDecoder.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/MeitrackProtocolDecoder.java b/src/org/traccar/protocol/MeitrackProtocolDecoder.java index 259283c19..3de71fa14 100644 --- a/src/org/traccar/protocol/MeitrackProtocolDecoder.java +++ b/src/org/traccar/protocol/MeitrackProtocolDecoder.java @@ -459,6 +459,10 @@ public class MeitrackProtocolDecoder extends BaseProtocolDecoder { switch (type) { case "D00": + if (photo == null) { + return null; + } + index = buf.indexOf(index + 1 + type.length() + 1, buf.writerIndex(), (byte) ',') + 1; int endIndex = buf.indexOf(index, buf.writerIndex(), (byte) ','); int total = Integer.parseInt(buf.toString(index, endIndex - index, StandardCharsets.US_ASCII)); |