Merge pull request #734 from zed-industries/fix-prompt-panic

Drop borrow to window state before calling beginSheetModalForWindow
This commit is contained in:
Nathan Sobo 2022-04-04 17:50:09 -06:00 committed by GitHub
commit 6daefc467a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -361,9 +361,10 @@ impl platform::Window for Window {
}
});
let block = block.copy();
let native_window = self.0.borrow().native_window;
let _: () = msg_send![
alert,
beginSheetModalForWindow: self.0.borrow().native_window
beginSheetModalForWindow: native_window
completionHandler: block
];
done_rx