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:
@@ -135,6 +135,9 @@ void Application::Run() {
|
||||
}
|
||||
}
|
||||
|
||||
if (!m_isRunning) {
|
||||
break;
|
||||
}
|
||||
// Rendering
|
||||
|
||||
for (auto &layer : m_LayerStack) {
|
||||
|
||||
Reference in New Issue
Block a user