17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-26 07:59:30 +01:00

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.
This commit is contained in:
maj00r
2026-10-21 08:41:59 +02:00
parent 8903d15b94
commit 9696b5f795

View File

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