From 67853345d60b49a8fa3686ebb16a1de17825b070 Mon Sep 17 00:00:00 2001 From: Patrick Owen Date: Sun, 5 May 2024 19:01:44 -0400 Subject: [PATCH] Fix Vulkan crash with TextureChange::Modified --- crates/yakui-vulkan/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/yakui-vulkan/src/lib.rs b/crates/yakui-vulkan/src/lib.rs index 28468fd2..df79435e 100644 --- a/crates/yakui-vulkan/src/lib.rs +++ b/crates/yakui-vulkan/src/lib.rs @@ -611,7 +611,9 @@ impl YakuiVulkan { TextureChange::Modified => { if let Some(old) = self.yakui_managed_textures.remove(&id) { - unsafe { old.cleanup(vulkan_context.device) }; + unsafe { + self.uploads.dispose(old); + } } let new = paint.texture(id).unwrap(); let texture = VulkanTexture::from_yakui_texture(