aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-rw-r--r--src/org/traccar/ServerManager.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java
index f79d543ff..5e59851f7 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -103,10 +103,12 @@ public class ServerManager {
if (protocol != null) {
BaseProtocol baseProtocol = protocols.get(protocol);
- for (String commandKey : baseProtocol.getSupportedCommands()) {
- SupportedCommand supportedCommand = new SupportedCommand();
- supportedCommand.setKey(commandKey);
- result.add(supportedCommand);
+ if (baseProtocol != null) {
+ for (String commandKey : baseProtocol.getSupportedCommands()) {
+ SupportedCommand supportedCommand = new SupportedCommand();
+ supportedCommand.setKey(commandKey);
+ result.add(supportedCommand);
+ }
}
}