Permalink
Browse files

Fix for NPE occuring during gtasks sync

  • Loading branch information...
1 parent 9b6150a commit 76bfd834dadd2951925d3352a7ebf2a9f2c4dbb0 @timsu timsu committed Oct 26, 2010
Showing with 4 additions and 1 deletion.
  1. +4 −1 astrid/plugin-src/com/todoroo/astrid/gtasks/GtasksTaskListUpdater.java
@@ -301,7 +301,10 @@ public void processTask(long taskId, Metadata metadata) {
sibling = previousTask.get();
for(int i = indent; i < previousIndent.get(); i++)
sibling = parents.get(sibling);
- parent = parents.get(sibling);
+ if(parents.containsKey(sibling))
+ parent = parents.get(sibling);
+ else
+ parent = -1L;
}
parents.put(taskId, parent);
siblings.put(taskId, sibling);

0 comments on commit 76bfd83

Please sign in to comment.