# HG changeset patch # User sam # Date 1723221128 -25200 # Node ID f7994a03b802304271eb705853d40206fe341b16 # Parent f0020945d016b5d8b08e83e5b7a72b1150b3a181 fix: error on release build diff -r f0020945d016 -r f7994a03b802 semicongine/rendering.nim --- a/semicongine/rendering.nim Fri Aug 09 18:49:20 2024 +0700 +++ b/semicongine/rendering.nim Fri Aug 09 23:32:08 2024 +0700 @@ -343,7 +343,8 @@ destroySwapchain(vulkan.swapchain) vkDestroyDevice(vulkan.device, nil) vkDestroySurfaceKHR(vulkan.instance, vulkan.surface, nil) - vkDestroyDebugUtilsMessengerEXT(vulkan.instance, vulkan.debugMessenger, nil) + if vulkan.debugMessenger.Valid: + vkDestroyDebugUtilsMessengerEXT(vulkan.instance, vulkan.debugMessenger, nil) vkDestroyInstance(vulkan.instance, nil) proc showSystemCursor*(value: bool) = vulkan.window.showSystemCursor(value)