Vulkan: Fix crash when device creation fails

This commit is contained in:
Connor McLaughlin 2020-07-07 00:59:42 +10:00
parent 1d4b5e22cb
commit da180a1c4f
1 changed files with 3 additions and 1 deletions

View File

@ -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();