Skip to content

Commit

Permalink
Fixes a crash on TabGroupUiCoordinator destroy method when it destroy…
Browse files Browse the repository at this point in the history
…s before native part been initialised (uplift to 1.70.x) (#25332)

Fixes a crash on TabGroupUiCoordinator destroy method when it destroys before native part been initialised
  • Loading branch information
SergeyZhukovsky authored Aug 27, 2024
1 parent 4c8998e commit d49a990
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,12 @@ public void initializeWithNative(

@Override
public void destroy() {
super.destroy();

try {
super.destroy();
} catch (NullPointerException ignore) {
// mTabStripCoordinator could be null in a base class.
// https://github.com/brave/brave-browser/issues/40673
}
mIncognitoStateProvider.removeObserver(mIncognitoStateObserver);
}
}

0 comments on commit d49a990

Please sign in to comment.