Merge pull request #1363 from deepak1556/native_window_mac_patch

nativeWindowMac: check for web_contents before clipping
This commit is contained in:
Cheng Zhao 2015-04-08 09:04:16 +08:00
commit 4ce3b407ab

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