diff --git a/shell/browser/ui/cocoa/electron_inspectable_web_contents_view.mm b/shell/browser/ui/cocoa/electron_inspectable_web_contents_view.mm index e4b797a001a1..3f86dca5158e 100644 --- a/shell/browser/ui/cocoa/electron_inspectable_web_contents_view.mm +++ b/shell/browser/ui/cocoa/electron_inspectable_web_contents_view.mm @@ -266,6 +266,8 @@ inspectableWebContentsView_->inspectable_web_contents(); DCHECK(inspectable_web_contents); auto* webContents = inspectable_web_contents->GetWebContents(); + if (!webContents) + return; auto* webContentsView = webContents->GetNativeView().GetNativeNSView(); NSView* view = [notification object];