aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/BaseProtocolDecoder.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/org/traccar/BaseProtocolDecoder.java b/src/org/traccar/BaseProtocolDecoder.java
index 630fe9a69..657e56258 100644
--- a/src/org/traccar/BaseProtocolDecoder.java
+++ b/src/org/traccar/BaseProtocolDecoder.java
@@ -46,8 +46,10 @@ public abstract class BaseProtocolDecoder extends OneToOneDecoder {
}
public BaseProtocolDecoder(ServerManager serverManager) {
- this.serverManager = serverManager;
- dataManager = serverManager.getDataManager();
+ if (serverManager != null) {
+ this.serverManager = serverManager;
+ dataManager = serverManager.getDataManager();
+ }
}
}