diff --git a/astrid/src/com/todoroo/astrid/activity/TaskListFragment.java b/astrid/src/com/todoroo/astrid/activity/TaskListFragment.java index 578698520..5df2e062d 100644 --- a/astrid/src/com/todoroo/astrid/activity/TaskListFragment.java +++ b/astrid/src/com/todoroo/astrid/activity/TaskListFragment.java @@ -367,12 +367,14 @@ public class TaskListFragment extends SherlockListFragment implements OnScrollLi @Override public void onItemClick(AdapterView parent, View view, int position, long id) { - TodorooCursor cursor = (TodorooCursor)taskAdapter.getItem(position); - Task task = new Task(cursor); - if(task.isDeleted()) - return; + if (taskAdapter != null) { + TodorooCursor cursor = (TodorooCursor)taskAdapter.getItem(position); + Task task = new Task(cursor); + if(task.isDeleted()) + return; - onTaskListItemClicked(id, task.isEditable()); + onTaskListItemClicked(id, task.isEditable()); + } } }); }