diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-06-12 12:13:03 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-06-12 12:13:03 +1200 |
commit | c995dde98c23b5ae1fe49261d48c7d7ce2618d7f (patch) | |
tree | d7324faf930991cfb2bb3ab1bffd6fcae67260e9 /src/org | |
parent | 0437de4a25092db28d63464e846f560da8c56304 (diff) | |
download | trackermap-server-c995dde98c23b5ae1fe49261d48c7d7ce2618d7f.tar.gz trackermap-server-c995dde98c23b5ae1fe49261d48c7d7ce2618d7f.tar.bz2 trackermap-server-c995dde98c23b5ae1fe49261d48c7d7ce2618d7f.zip |
Protect against missing group
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/database/GroupTree.java | 8 |
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); + } } } |