Fix memory leak in VulkanContext

This commit is contained in:
Rafał Mikrut 2021-03-07 15:28:47 +01:00
parent afd0df7921
commit f9d0ea9f6b
1 changed files with 1 additions and 1 deletions

View File

@ -1705,7 +1705,7 @@ VulkanContext::~VulkanContext() {
vkDestroySemaphore(device, image_ownership_semaphores[i], nullptr);
}
}
if (inst_initialized && use_validation_layers) {
if (inst_initialized && enabled_debug_utils) {
DestroyDebugUtilsMessengerEXT(inst, dbg_messenger, nullptr);
}
vkDestroyDevice(device, nullptr);