From: deepak1556 Date: Mon, 6 Apr 2015 09:52:26 +0000 (+0530) Subject: nativeWindowMac: check for web_contents before clipping X-Git-Tag: v0.23.0~7^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=1d97c2c8f28798620013a6a49dbadc136087201e;p=electron.git nativeWindowMac: check for web_contents before clipping --- 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; }