aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-06-12 12:13:03 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2016-06-12 12:13:03 +1200
commitc995dde98c23b5ae1fe49261d48c7d7ce2618d7f (patch)
treed7324faf930991cfb2bb3ab1bffd6fcae67260e9 /src/org/traccar
parent0437de4a25092db28d63464e846f560da8c56304 (diff)
downloadtrackermap-server-c995dde98c23b5ae1fe49261d48c7d7ce2618d7f.tar.gz
trackermap-server-c995dde98c23b5ae1fe49261d48c7d7ce2618d7f.tar.bz2
trackermap-server-c995dde98c23b5ae1fe49261d48c7d7ce2618d7f.zip
Protect against missing group
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/database/GroupTree.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/org/traccar/database/GroupTree.java b/src/org/traccar/database/GroupTree.java
index 4a2321f58..9062e7aa8 100644
--- a/src/org/traccar/database/GroupTree.java
+++ b/src/org/traccar/database/GroupTree.java
@@ -140,9 +140,11 @@ public class GroupTree {
}
private void getNodes(Set<TreeNode> results, TreeNode node) {
- for (TreeNode child : node.getChildren()) {
- results.add(child);
- getNodes(results, child);
+ if (node != null) {
+ for (TreeNode child : node.getChildren()) {
+ results.add(child);
+ getNodes(results, child);
+ }
}
}