fix: ensure owner window valid (#27786)
This commit is contained in:
parent
c30484ce13
commit
e5a9a1ebd7
1 changed files with 1 additions and 1 deletions
|
@ -1118,7 +1118,7 @@ void BaseWindow::ResetBrowserViews() {
|
|||
// reset if the owner window is *this* window.
|
||||
if (browser_view->web_contents()) {
|
||||
auto* owner_window = browser_view->web_contents()->owner_window();
|
||||
if (owner_window == window_.get()) {
|
||||
if (owner_window && owner_window == window_.get()) {
|
||||
browser_view->web_contents()->SetOwnerWindow(nullptr);
|
||||
owner_window->RemoveBrowserView(browser_view->view());
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue