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);
|
||||
framebuffers.clear();
|
||||
|
||||
if (commandPool != VK_NULL_HANDLE)
|
||||
{
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user