From 1d97c2c8f28798620013a6a49dbadc136087201e Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Mon, 6 Apr 2015 15:22:26 +0530 Subject: [PATCH] nativeWindowMac: check for web_contents before clipping --- atom/browser/native_window_mac.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index 069b5cad..2480e22f 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; } -- 2.43.0