mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
vulkan: fix crash on quit if no window has been created.
This commit is contained in:
@@ -3241,9 +3241,23 @@ void Graphics::cleanup()
|
|||||||
vkDestroyFramebuffer(device, entry.second, nullptr);
|
vkDestroyFramebuffer(device, entry.second, nullptr);
|
||||||
framebuffers.clear();
|
framebuffers.clear();
|
||||||
|
|
||||||
vkDestroyCommandPool(device, commandPool, nullptr);
|
if (commandPool != VK_NULL_HANDLE)
|
||||||
vkDestroyPipelineCache(device, pipelineCache, nullptr);
|
{
|
||||||
vkDestroyDevice(device, nullptr);
|
vkDestroyCommandPool(device, commandPool, nullptr);
|
||||||
|
commandPool = VK_NULL_HANDLE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pipelineCache != VK_NULL_HANDLE)
|
||||||
|
{
|
||||||
|
vkDestroyPipelineCache(device, pipelineCache, nullptr);
|
||||||
|
pipelineCache = VK_NULL_HANDLE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (device != VK_NULL_HANDLE)
|
||||||
|
{
|
||||||
|
vkDestroyDevice(device, nullptr);
|
||||||
|
device = VK_NULL_HANDLE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Graphics::cleanupSwapChain()
|
void Graphics::cleanupSwapChain()
|
||||||
|
|||||||
Reference in New Issue
Block a user