mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-03 08:54:04 +00:00
Merge pull request #1534 from zed-industries/fix-crash-on-window-close
Fix crash when closing a window while in full-screen mode
This commit is contained in:
commit
6ffaa0394a
1 changed files with 9 additions and 3 deletions
|
@ -458,9 +458,15 @@ impl Window {
|
||||||
|
|
||||||
impl Drop for Window {
|
impl Drop for Window {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
unsafe {
|
let this = self.0.borrow();
|
||||||
self.0.as_ref().borrow().native_window.close();
|
let window = this.native_window;
|
||||||
}
|
this.executor
|
||||||
|
.spawn(async move {
|
||||||
|
unsafe {
|
||||||
|
window.close();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.detach();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue