Skip to content

Commit

Permalink
fix: ensure web_contents() is alive before grabbing view (#30572)
Browse files Browse the repository at this point in the history
  • Loading branch information
VerteDinde committed Aug 17, 2021
1 parent c3d8337 commit 62b3a6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shell/browser/api/electron_api_browser_window_views.cc
Expand Up @@ -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) {
Expand Down

0 comments on commit 62b3a6b

Please sign in to comment.