Check if model is null

pull/618/head
Alex Baker 7 years ago
parent 88125b0310
commit 6cc5bcac14

@ -273,7 +273,7 @@ public final class TaskEditFragment extends InjectingFragment implements Toolbar
} }
public void discard() { public void discard() {
if (model.isNew()) { if (model != null && model.isNew()) {
timerPlugin.stopTimer(model); timerPlugin.stopTimer(model);
taskDeleter.delete(model); taskDeleter.delete(model);
} }

Loading…
Cancel
Save