nativeWindowMac: check for web_contents before clipping

This commit is contained in:
deepak1556 2015-04-06 15:22:26 +05:30
parent 5ff9588b48
commit 1d97c2c8f2

View file

@ -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;
}