diff --git a/examples/vulkan/Vulkan.cpp b/examples/vulkan/Vulkan.cpp index c750029c..2d2ad2f7 100644 --- a/examples/vulkan/Vulkan.cpp +++ b/examples/vulkan/Vulkan.cpp @@ -2479,7 +2479,8 @@ public: swapchainOutOfDate = true; } - if (vulkanAvailable) + // Check that window was not closed before drawing to it + if (vulkanAvailable && window.isOpen()) { // Update the uniform buffer (matrices) updateUniformBuffer(clock.getElapsedTime().asSeconds());