Skip to content

Commit

Permalink
Do not update action visibility if previous popup owner is null
Browse files Browse the repository at this point in the history
  • Loading branch information
zenparsing committed Dec 7, 2021
1 parent e494247 commit f44142b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions browser/ui/views/brave_actions/brave_actions_container.cc
Original file line number Diff line number Diff line change
Expand Up @@ -449,13 +449,11 @@ void BraveActionsContainer::SetPopupOwner(
DCHECK(!popup_owner_);
popup_owner_ = popup_owner;
UpdateActionVisibility(popup_owner->GetId());
return;
} else if (popup_owner_) {
auto* previous_owner = popup_owner_;
popup_owner_ = nullptr;
UpdateActionVisibility(previous_owner->GetId());
}

auto* previous_owner = popup_owner_;
DCHECK(previous_owner);
popup_owner_ = nullptr;
UpdateActionVisibility(previous_owner->GetId());
}

void BraveActionsContainer::HideActivePopup() {
Expand Down

0 comments on commit f44142b

Please sign in to comment.