From c995dde98c23b5ae1fe49261d48c7d7ce2618d7f Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 12 Jun 2016 12:13:03 +1200 Subject: Protect against missing group --- src/org/traccar/database/GroupTree.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') 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 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); + } } } -- cgit v1.2.3