Skip to content

Commit

Permalink
Verify integrity of fragment manager before executePendingTransa… (#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
kmagiera committed Feb 24, 2020
1 parent d3b6bea commit 4e8d13d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@ protected void onDetachedFromWindow() {
// 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;
}
Expand Down

0 comments on commit 4e8d13d

Please sign in to comment.