aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
authorGábor Somogyi <gabor.g.somogyi@gmail.com>2016-05-05 23:24:18 +0200
committerGábor Somogyi <gabor.g.somogyi@gmail.com>2016-05-05 23:24:18 +0200
commit69c6d76fa6f5aba94477fae71fc348cd464ba2ac (patch)
treeb21fbbc44b2bddedddd281689d9f9d1af3f2b6b5 /src/org/traccar/ServerManager.java
parentbe0040a7c18f5c165f1aaa27a194a189f50b1510 (diff)
downloadtrackermap-server-69c6d76fa6f5aba94477fae71fc348cd464ba2ac.tar.gz
trackermap-server-69c6d76fa6f5aba94477fae71fc348cd464ba2ac.tar.bz2
trackermap-server-69c6d76fa6f5aba94477fae71fc348cd464ba2ac.zip
Protocol null check added
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);
+ }
}
}