Fix exception on Vulkan example shutdown

This change fixes exception on Vulkan example shutdown when drawing
to window after it was closed.
This commit is contained in:
Anton Vasiliev 2021-12-07 05:50:23 +03:00 committed by Vittorio Romeo
parent b9da3b879c
commit ce5d410c74

View File

@ -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());