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

This commit is contained in:
Samuel Attard 2021-08-17 14:00:49 -07:00 committed by GitHub
parent db8644ee7a
commit b62bbfda4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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