diff options
author | Abyss777 <abyss@fox5.ru> | 2018-02-02 13:53:49 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2018-02-02 13:53:49 +0500 |
commit | af49fada37f21df9ed5ceb67504c45b714ec24d4 (patch) | |
tree | c3867b51f0e17104fca09c5b4ebd2c308ed6597e /src/org/traccar/protocol/MeitrackProtocolDecoder.java | |
parent | 8f4d1c67d3996657c57ed868f34da4066095480c (diff) | |
download | trackermap-server-af49fada37f21df9ed5ceb67504c45b714ec24d4.tar.gz trackermap-server-af49fada37f21df9ed5ceb67504c45b714ec24d4.tar.bz2 trackermap-server-af49fada37f21df9ed5ceb67504c45b714ec24d4.zip |
- Use "media.path" as switch
- Handle if MediaManager undefined
Diffstat (limited to 'src/org/traccar/protocol/MeitrackProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/MeitrackProtocolDecoder.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/MeitrackProtocolDecoder.java b/src/org/traccar/protocol/MeitrackProtocolDecoder.java index 11e38194f..4d42683b1 100644 --- a/src/org/traccar/protocol/MeitrackProtocolDecoder.java +++ b/src/org/traccar/protocol/MeitrackProtocolDecoder.java @@ -477,7 +477,9 @@ public class MeitrackProtocolDecoder extends BaseProtocolDecoder { getLastLocation(position, null); - position.set(Position.KEY_IMAGE, Context.getMediaManager().writeFile(imei, photo, "jpg")); + if (Context.getMediaManager() != null) { + position.set(Position.KEY_IMAGE, Context.getMediaManager().writeFile(imei, photo, "jpg")); + } photo = null; return position; |