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

* resets WindowButtonsProxy on window delete on macOS

* fixes reset

Co-authored-by: Gellert Hegyi <gellert.hegyi@around.co>
This commit is contained in:
trop[bot]
2022-03-29 12:25:01 -04:00
committed by GitHub
parent 0d17fac455
commit 41aaed307d

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