Skip to content

Fixed crash when a tab is added to saved group (uplift to 1.66.x) #23229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@ void BraveSavedTabGroupButton::Initialize() {
}

void BraveSavedTabGroupButton::UpdateButtonLayout() {
// This seems called after this class is removed from widget.
// If a tab is added to existing group and that tab is the only
// tab in the current window, it seems that window is closed
// when that group is in another window during this adding.
// I think SavedTabGroupBar should stop observing SavedTabGroupModel
// when it's removed from widget but it's upstream code and upstream
// doesn't have this issue.
if (!GetWidget()) {
return;
}

auto* cp = GetColorProvider();

// Note that upstream uses separate color IDs for the button background,
Expand Down
Loading