Fix seg fault when using the WindowContext::on_window_should_close() API
This commit is contained in:
parent
2a09c6aad5
commit
7ef88397c9
5 changed files with 13 additions and 6 deletions
|
@ -148,6 +148,7 @@ pub fn initialize_workspace(app_state: Arc<AppState>, cx: &mut AppContext) {
|
|||
cx.on_window_should_close(move |cx| {
|
||||
handle
|
||||
.update(cx, |workspace, cx| {
|
||||
// We'll handle closing asynchoronously
|
||||
workspace.close_window(&Default::default(), cx);
|
||||
false
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue