Fix one possible crash

This commit is contained in:
Benau 2022-07-23 15:10:45 +08:00
parent d325e33fc0
commit 9f25652455

View File

@ -418,8 +418,11 @@ namespace GE
vkDestroyFramebuffer(device, framebuffer, NULL);
if (render_pass != VK_NULL_HANDLE)
vkDestroyRenderPass(device, render_pass, NULL);
if (device != VK_NULL_HANDLE)
{
for (unsigned i = 0; i < GVS_COUNT; i++)
vkDestroySampler(device, samplers[i], NULL);
}
for (VkSemaphore& semaphore : image_available_semaphores)
vkDestroySemaphore(device, semaphore, NULL);
for (VkSemaphore& semaphore : render_finished_semaphores)