From 9696b5f7956c3fb5d577c6e3a1c2c11c250aad31 Mon Sep 17 00:00:00 2001 From: maj00r Date: Wed, 21 Oct 2026 08:41:59 +0200 Subject: [PATCH] fix: closing the simulator no longer makes a destroyed window current The python task queue was stopped after the windows were destroyed, and its worker, leaving, released the context of its own window, which was gone by then: a use after free on every exit. The queue is stopped first. --- application/application.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/application.cpp b/application/application.cpp index 3c0acc54..012cd4e3 100644 --- a/application/application.cpp +++ b/application/application.cpp @@ -717,11 +717,11 @@ void eu07_application::exit() ui_layer::shutdown(); + m_taskqueue.exit(); for (auto *window : m_windows) { glfwDestroyWindow(window); } - m_taskqueue.exit(); glfwPollEvents(); // TODO: This fixes a segfault on Wayland when closing. Remove after updating glfw to 3.5. glfwTerminate();