diff --git a/astrid/plugin-src/com/todoroo/astrid/subtasks/OrderedListUpdater.java b/astrid/plugin-src/com/todoroo/astrid/subtasks/OrderedListUpdater.java index 06ebd0516..29f18bd57 100644 --- a/astrid/plugin-src/com/todoroo/astrid/subtasks/OrderedListUpdater.java +++ b/astrid/plugin-src/com/todoroo/astrid/subtasks/OrderedListUpdater.java @@ -268,10 +268,13 @@ abstract public class OrderedListUpdater { 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()); }