From 2f1b154762a3acef46d0ab33dc9955410cbc7b33 Mon Sep 17 00:00:00 2001 From: kelpsyberry <138107494+kelpsyberry@users.noreply.github.com> Date: Fri, 29 Mar 2024 22:51:41 +0100 Subject: [PATCH] Drop old surface texture before reconfiguring --- frontend/desktop/src/ui/window.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/desktop/src/ui/window.rs b/frontend/desktop/src/ui/window.rs index 1378ade..7ecd001 100644 --- a/frontend/desktop/src/ui/window.rs +++ b/frontend/desktop/src/ui/window.rs @@ -139,6 +139,7 @@ impl GfxSurface { match self.surface.get_current_texture() { Ok(frame) => { if frame.suboptimal { + drop(frame); self.update_format_and_rebuild_swapchain(gfx, size); } else { break frame;