mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Merge pull request #1363 from deepak1556/native_window_mac_patch
nativeWindowMac: check for web_contents before clipping
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user