fix: crash when WindowButtonsProxy references cleared NSWindow (#33069)

* resets WindowButtonsProxy on window delete on macOS

* fixes reset
This commit is contained in:
Gellert Hegyi 2022-03-29 05:02:44 +02:00 committed by GitHub
parent 594dc7e24a
commit 4aeeb64d30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -328,6 +328,8 @@ NativeWindowMac::NativeWindowMac(const gin_helper::Dictionary& options,
[](NativeWindowMac* window) {
if (window->window_)
window->window_ = nil;
if (window->buttons_proxy_)
window->buttons_proxy_.reset();
},
this));