From 4130ebf5f92fbeec0389f8af36603cf0caece25f Mon Sep 17 00:00:00 2001 From: Serkyo Date: Sat, 16 May 2026 19:28:54 +0200 Subject: [PATCH] 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. --- crates/client/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/client/src/main.rs b/crates/client/src/main.rs index 2fc44d9..904a29a 100644 --- a/crates/client/src/main.rs +++ b/crates/client/src/main.rs @@ -14,8 +14,8 @@ use winit::window::{Window, WindowId}; #[derive(Default)] struct App { - window: Option, renderer: Option, + window: Option, } impl ApplicationHandler for App {