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:
Serkyo 2026-05-16 19:28:54 +02:00
parent 19f79080b1
commit 4130ebf5f9

View file

@ -14,8 +14,8 @@ use winit::window::{Window, WindowId};
#[derive(Default)] #[derive(Default)]
struct App { struct App {
window: Option<Window>,
renderer: Option<renderer::Renderer>, renderer: Option<renderer::Renderer>,
window: Option<Window>,
} }
impl ApplicationHandler for App { impl ApplicationHandler for App {