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

* 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

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
This commit is contained in:
trop[bot]
2020-01-29 17:43:55 -08:00
committed by GitHub
parent 048d770a0e
commit 0cee5cc1c1

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.