Skip to content

Commit

Permalink
fix: crash when WindowButtonsProxy references cleared NSWindow (#33488)
Browse files Browse the repository at this point in the history
* resets WindowButtonsProxy on window delete on macOS

* fixes reset

Co-authored-by: Gellert Hegyi <gellert.hegyi@around.co>
  • Loading branch information
trop[bot] and gerhardberger committed Mar 29, 2022
1 parent 1401284 commit a071825
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions shell/browser/native_window_mac.mm
Expand Up @@ -328,6 +328,8 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) {
[](NativeWindowMac* window) {
if (window->window_)
window->window_ = nil;
if (window->buttons_proxy_)
window->buttons_proxy_.reset();
},
this));

Expand Down

0 comments on commit a071825

Please sign in to comment.