From ccbc79d496daef847eed09425708db4a8e0c2d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hatvani=20Tam=C3=A1s?= Date: Tue, 14 Apr 2026 18:03:36 +0200 Subject: [PATCH] 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 --- SakuraCore/src/Application.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SakuraCore/src/Application.cpp b/SakuraCore/src/Application.cpp index 86e4dc4..ab6f35b 100644 --- a/SakuraCore/src/Application.cpp +++ b/SakuraCore/src/Application.cpp @@ -135,6 +135,9 @@ void Application::Run() { } } + if (!m_isRunning) { + break; + } // Rendering for (auto &layer : m_LayerStack) {