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

This commit is contained in:
Keeley Hammond
2021-08-17 14:08:25 -07:00
committed by GitHub
parent c3d8337058
commit 62b3a6b724

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) {