From e50422c61c34217d379a146753c8b00d7c174645 Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Wed, 11 Jan 2012 18:37:21 -0800 Subject: [PATCH] Fixed a bug with an occasional crash when rotating FLA --- .../astrid/activity/FilterListWrapperActivity.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/astrid/src/com/todoroo/astrid/activity/FilterListWrapperActivity.java b/astrid/src/com/todoroo/astrid/activity/FilterListWrapperActivity.java index 330cca6fb..92f1092c7 100644 --- a/astrid/src/com/todoroo/astrid/activity/FilterListWrapperActivity.java +++ b/astrid/src/com/todoroo/astrid/activity/FilterListWrapperActivity.java @@ -2,6 +2,8 @@ package com.todoroo.astrid.activity; import android.os.Bundle; import android.support.v4.app.Fragment; +import android.support.v4.app.FragmentManager; +import android.support.v4.app.FragmentTransaction; import android.widget.TextView; import com.timsu.astrid.R; @@ -21,6 +23,16 @@ public class FilterListWrapperActivity extends AstridWrapperActivity { setContentView(R.layout.filter_list_wrapper_activity); if (findViewById(R.id.tasklist_fragment_container) != null) setupTasklistFragmentWithFilter((Filter)getIntent().getParcelableExtra(TaskListActivity.TOKEN_FILTER)); + else { + Fragment tla = getTaskListFragment(); + + if (tla != null) { + FragmentManager manager = getSupportFragmentManager(); + FragmentTransaction transaction = manager.beginTransaction(); + transaction.remove(tla); + transaction.commit(); + } + } } /* (non-Javadoc)