diff --git a/shell/browser/api/atom_api_browser_window_mac.mm b/shell/browser/api/atom_api_browser_window_mac.mm index 8d0108d2f263..378cb5d6cd86 100644 --- a/shell/browser/api/atom_api_browser_window_mac.mm +++ b/shell/browser/api/atom_api_browser_window_mac.mm @@ -79,6 +79,9 @@ void BrowserWindow::UpdateDraggableRegions( if (window_->has_frame()) return; + if (!web_contents()) + return; + // All ControlRegionViews should be added as children of the WebContentsView, // because WebContentsView will be removed and re-added when entering and // leaving fullscreen mode.