fix: ensure web_contents is not nullptr in UpdateDraggableRegions (#21955)

* fix: ensure web_contents is not nullptr in UpdateDraggableRegions

This is a speculative fix for a crash in `UpdateDraggableRegions` that we've noticed

* Update atom_api_browser_window_mac.mm

* Update atom_api_browser_window_mac.mm
This commit is contained in:
Samuel Attard
2020-01-29 16:55:27 -08:00
committed by GitHub
parent 2a47300d61
commit e528029345

View File

@@ -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.