aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/GroupTree.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/database/GroupTree.java')
-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);
+ }
}
}