fixed: the application crashes when the user used the x button or key combination to close the window

the crash occured because running state was set false but the
application loop was still running during that frame and rendered to the
now closed window, because the check only happened at the start of the
next frame
This commit is contained in:
2026-04-14 18:03:36 +02:00
parent 7ff93e58ea
commit ccbc79d496

View File

@@ -135,6 +135,9 @@ void Application::Run() {
}
}
if (!m_isRunning) {
break;
}
// Rendering
for (auto &layer : m_LayerStack) {