From b4138d8c9220b54563a0fc9a559a7f98f6ece6b8 Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Wed, 28 Mar 2012 17:01:41 -0700 Subject: [PATCH] Fixed a bug in how task edit fragment handles rotation, incidentally solving a couple crashes --- .../src/com/todoroo/astrid/activity/TaskEditFragment.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/astrid/src/com/todoroo/astrid/activity/TaskEditFragment.java b/astrid/src/com/todoroo/astrid/activity/TaskEditFragment.java index 60d8eb397..0d6a4455f 100755 --- a/astrid/src/com/todoroo/astrid/activity/TaskEditFragment.java +++ b/astrid/src/com/todoroo/astrid/activity/TaskEditFragment.java @@ -893,9 +893,11 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener { R.anim.slide_right_in, R.anim.slide_right_out); } - if (title.getText().length() == 0 && isNewTask - && model != null && model.isSaved()) { - taskService.delete(model); + if (getActivity() instanceof TaskListActivity) { + if (title.getText().length() == 0 && isNewTask + && model != null && model.isSaved()) { + taskService.delete(model); + } } }