Verify integrity of fragment manager before executePendingTransa… (#377)

This commit is contained in:
Krzysztof Magiera
2020-02-24 18:03:46 +01:00
committed by GitHub
parent d3b6bea594
commit 4e8d13dc72

View File

@@ -221,7 +221,9 @@ public class ScreenContainer<T extends ScreenFragment> extends ViewGroup {
// if there are pending transactions and this view is about to get detached we need to perform
// them here as otherwise fragment manager will crash because it won't be able to find container
// view.
mFragmentManager.executePendingTransactions();
if (mFragmentManager != null && !mFragmentManager.isDestroyed()) {
mFragmentManager.executePendingTransactions();
}
super.onDetachedFromWindow();
mIsAttached = false;
}