Browse Source

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

* resets WindowButtonsProxy on window delete on macOS

* fixes reset

* chore: empty commit

Co-authored-by: Gellert Hegyi <[email protected]>
Co-authored-by: Samuel Attard <[email protected]>
trop[bot] 3 years ago
parent
commit
4e75499270
1 changed files with 2 additions and 0 deletions
  1. 2 0
      shell/browser/native_window_mac.mm

+ 2 - 0
shell/browser/native_window_mac.mm

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