diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index 069b5cadef0f..2480e22fb165 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -820,7 +820,10 @@ void NativeWindowMac::UninstallView() { } void NativeWindowMac::ClipWebView() { - NSView* webView = GetWebContents()->GetNativeView(); + content::WebContents* web_contents = GetWebContents(); + if (!web_contents) + return; + NSView* webView = web_contents->GetNativeView(); webView.layer.masksToBounds = YES; webView.layer.cornerRadius = kAtomWindowCornerRadius; }