From e1111fa596ca7cfe461aa539afe83ce1ff5fdc7e Mon Sep 17 00:00:00 2001 From: apricotbucket28 Date: Fri, 30 Aug 2024 14:54:36 -0300 Subject: [PATCH] Destroy queue before device --- blade-graphics/src/vulkan/init.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blade-graphics/src/vulkan/init.rs b/blade-graphics/src/vulkan/init.rs index 3b4ac739..07625df8 100644 --- a/blade-graphics/src/vulkan/init.rs +++ b/blade-graphics/src/vulkan/init.rs @@ -1034,8 +1034,6 @@ impl Drop for super::Context { surface_instance.destroy_surface(surface.raw, None); } } - self.device.core.destroy_device(None); - self.instance.core.destroy_instance(None); if let Ok(queue) = self.queue.lock() { self.device .core @@ -1044,6 +1042,8 @@ impl Drop for super::Context { .core .destroy_semaphore(queue.present_semaphore, None); } + self.device.core.destroy_device(None); + self.instance.core.destroy_instance(None); } } }