From 037a91954576059f995f91e72cf3f657aed1ac35 Mon Sep 17 00:00:00 2001 From: Arne Jans Date: Thu, 26 Jan 2012 12:30:24 +0100 Subject: [PATCH] Fixed search-function crashes Astrid --- astrid/src/com/todoroo/astrid/activity/TaskListActivity.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java b/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java index 1b6ad5dd4..0f9437427 100644 --- a/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java +++ b/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java @@ -345,7 +345,6 @@ public class TaskListActivity extends ListFragment implements OnScrollListener, overrideFinishAnim = false; } String intentAction = intent.getAction(); - // FIXME maybe SEARCH has to go into the Wrapper-activity and forward to the filterFragment if (Intent.ACTION_SEARCH.equals(intentAction)) { String query = intent.getStringExtra(SearchManager.QUERY).trim(); Filter searchFilter = new Filter(null, getString(R.string.FLA_search_filter, query), @@ -1167,7 +1166,7 @@ public class TaskListActivity extends ListFragment implements OnScrollListener, private static final String PREF_LAST_AUTO_SYNC = "taskListLastAutoSync"; //$NON-NLS-1$ protected void initiateAutomaticSync() { - if (filter.title == null || !filter.title.equals(getString(R.string.BFE_Active))) + if (filter == null || filter.title == null || !filter.title.equals(getString(R.string.BFE_Active))) return; long lastAutoSync = Preferences.getLong(PREF_LAST_AUTO_SYNC, 0);