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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user