nativeWindowMac: check for web_contents before clipping
This commit is contained in:
parent
5ff9588b48
commit
1d97c2c8f2
1 changed files with 4 additions and 1 deletions
|
@ -820,7 +820,10 @@ void NativeWindowMac::UninstallView() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindowMac::ClipWebView() {
|
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.masksToBounds = YES;
|
||||||
webView.layer.cornerRadius = kAtomWindowCornerRadius;
|
webView.layer.cornerRadius = kAtomWindowCornerRadius;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue