From 6cc5bcac14d4f590cb39147008aa65029ddc5a84 Mon Sep 17 00:00:00 2001 From: Alex Baker Date: Wed, 24 Jan 2018 21:16:43 -0600 Subject: [PATCH] Check if model is null --- .../main/java/com/todoroo/astrid/activity/TaskEditFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/todoroo/astrid/activity/TaskEditFragment.java b/app/src/main/java/com/todoroo/astrid/activity/TaskEditFragment.java index 7351fbb7e..72a3bcbc9 100755 --- a/app/src/main/java/com/todoroo/astrid/activity/TaskEditFragment.java +++ b/app/src/main/java/com/todoroo/astrid/activity/TaskEditFragment.java @@ -273,7 +273,7 @@ public final class TaskEditFragment extends InjectingFragment implements Toolbar } public void discard() { - if (model.isNew()) { + if (model != null && model.isNew()) { timerPlugin.stopTimer(model); taskDeleter.delete(model); }