fix: ensure web_contents() is alive before grabbing view (#31187)

This commit is contained in:
Keeley Hammond
2021-09-29 17:18:22 -04:00
committed by GitHub
parent 086aea1ad8
commit fed38c1c01

View File

@@ -17,7 +17,7 @@ void BrowserWindow::UpdateDraggableRegions(
if (window_->has_frame())
return;
if (&draggable_regions_ != &regions) {
if (&draggable_regions_ != &regions && web_contents()) {
auto* view =
static_cast<content::WebContentsImpl*>(web_contents())->GetView();
if (view) {