Fix issue #2733766: Crash in Gallery onDestroy: java.lang.RuntimeException
Change-Id: I1c67a6603c23d15fef9a6912c86ffdf77aaa8654
This commit is contained in:
@@ -2068,8 +2068,10 @@ public class Activity extends ContextThemeWrapper
|
||||
|
||||
public void onContentChanged() {
|
||||
// First time content is available, let the fragment manager
|
||||
// attach all of the fragments to it.
|
||||
if (mFragments.mCurState < Fragment.CONTENT) {
|
||||
// attach all of the fragments to it. Don't do this if the
|
||||
// activity is no longer attached (because it is being destroyed).
|
||||
if (mFragments.mCurState < Fragment.CONTENT
|
||||
&& mFragments.mActivity != null) {
|
||||
mFragments.moveToState(Fragment.CONTENT, false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user