mirror of
https://github.com/electron/electron.git
synced 2026-01-11 08:28:20 -05:00
fix: mac window crash native theme update (#31329)
This commit is contained in:
@@ -324,6 +324,13 @@ NativeWindowMac::NativeWindowMac(const gin_helper::Dictionary& options,
|
||||
window_ = static_cast<ElectronNSWindow*>(
|
||||
widget()->GetNativeWindow().GetNativeNSWindow());
|
||||
|
||||
RegisterDeleteDelegateCallback(base::BindOnce(
|
||||
[](NativeWindowMac* window) {
|
||||
if (window->window_)
|
||||
window->window_ = nil;
|
||||
},
|
||||
this));
|
||||
|
||||
[window_ setEnableLargerThanScreen:enable_larger_than_screen()];
|
||||
|
||||
window_delegate_.reset([[ElectronNSWindowDelegate alloc] initWithShell:this]);
|
||||
|
||||
Reference in New Issue
Block a user