diff --git a/src/common/vulkan/context.cpp b/src/common/vulkan/context.cpp index 3b0a6f101..a9b932edb 100644 --- a/src/common/vulkan/context.cpp +++ b/src/common/vulkan/context.cpp @@ -39,7 +39,9 @@ Context::Context(VkInstance instance, VkPhysicalDevice physical_device, bool own Context::~Context() { - WaitForGPUIdle(); + if (m_device != VK_NULL_HANDLE) + WaitForGPUIdle(); + DestroyRenderPassCache(); DestroyGlobalDescriptorPool(); DestroyCommandBuffers();