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

* 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 11:40:05 -04:00
committed by GitHub
parent b31f855ea4
commit 7761ea6713

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