Fix seg-fault when using without a window (#1874)

* Fix seg-fault when using without a window #1869

* Update changelog
This commit is contained in:
Artúr Kovács 2021-03-06 11:17:23 +01:00 committed by GitHub
parent 3571dcd68c
commit 4192d04a53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 11 deletions

View file

@ -1158,7 +1158,7 @@ impl Drop for UnownedWindow {
trace!("Dropping `UnownedWindow` ({:?})", self as *mut _);
// Close the window if it has not yet been closed.
if *self.ns_window != nil {
unsafe { util::close_async(*self.ns_window) };
unsafe { util::close_async(self.ns_window.clone()) };
}
}
}