From f9d0ea9f6b6651bb2ae9d70524c6aaf295644e50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mikrut?= Date: Sun, 7 Mar 2021 15:28:47 +0100 Subject: [PATCH] Fix memory leak in VulkanContext --- drivers/vulkan/vulkan_context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp index c564cee757d..ad740efec41 100644 --- a/drivers/vulkan/vulkan_context.cpp +++ b/drivers/vulkan/vulkan_context.cpp @@ -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);