Fix for force close when you have an orphaned top-level child

pull/14/head
Tim Su 13 years ago
parent 69d6bfb51a
commit 2b56bc11eb

@ -268,10 +268,13 @@ abstract public class OrderedListUpdater<LIST> {
parent.children.add(currentNode.get());
} else { // in a different tree
Node node = currentNode.get().parent;
for(int i = indent; i < previousIndentValue; i++)
for(int i = indent; i < previousIndentValue; i++) {
node = node.parent;
if(node == null)
node = root;
if(node == null) {
node = root;
break;
}
}
currentNode.set(new Node(taskId, node));
node.children.add(currentNode.get());
}

Loading…
Cancel
Save