diff --git a/navigation-fragment/src/main/java/androidx/navigation/fragment/FragmentNavigator.java b/navigation-fragment/src/main/java/androidx/navigation/fragment/FragmentNavigator.java index 7fcdedf..ca4d583 100644 --- a/navigation-fragment/src/main/java/androidx/navigation/fragment/FragmentNavigator.java +++ b/navigation-fragment/src/main/java/androidx/navigation/fragment/FragmentNavigator.java @@ -196,7 +196,7 @@ public void onAnimationRepeat(Animation animation) { } private void performPopBack(Fragment preFrag) { - if (preFrag != null) { + if (preFrag != null && !preFrag.isDetached()) { mFragmentManager.beginTransaction().setMaxLifecycle(preFrag, Lifecycle.State.RESUMED).commit(); } mFragmentManager.popBackStack(