fix(client): drop renderer before window on shutdown
Reorder the fields of App so renderer is declared before window. Rust drops struct fields in declaration order, and the renderer owns a Vulkan surface tied to the window's display-server handle; tearing the window down first leaves the surface dangling when Renderer::drop runs.
This commit is contained in:
parent
19f79080b1
commit
4130ebf5f9
|
|
@ -14,8 +14,8 @@ use winit::window::{Window, WindowId};
|
|||
|
||||
#[derive(Default)]
|
||||
struct App {
|
||||
window: Option<Window>,
|
||||
renderer: Option<renderer::Renderer>,
|
||||
window: Option<Window>,
|
||||
}
|
||||
|
||||
impl ApplicationHandler for App {
|
||||
|
|
|
|||
Loading…
Reference in a new issue