X Tutup
Skip to content

Commit 41aaed3

Browse files
fix: crash when WindowButtonsProxy references cleared NSWindow (electron#33490)
* resets WindowButtonsProxy on window delete on macOS * fixes reset Co-authored-by: Gellert Hegyi <gellert.hegyi@around.co>
1 parent 0d17fac commit 41aaed3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

shell/browser/native_window_mac.mm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,8 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) {
328328
[](NativeWindowMac* window) {
329329
if (window->window_)
330330
window->window_ = nil;
331+
if (window->buttons_proxy_)
332+
window->buttons_proxy_.reset();
331333
},
332334
this));
333335

0 commit comments

Comments
 (0)
X Tutup