mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-06 20:58:35 +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();
|
ui_layer::shutdown();
|
||||||
|
|
||||||
|
m_taskqueue.exit();
|
||||||
for (auto *window : m_windows)
|
for (auto *window : m_windows)
|
||||||
{
|
{
|
||||||
glfwDestroyWindow(window);
|
glfwDestroyWindow(window);
|
||||||
}
|
}
|
||||||
m_taskqueue.exit();
|
|
||||||
glfwPollEvents(); // TODO: This fixes a segfault on Wayland when closing. Remove after updating glfw to 3.5.
|
glfwPollEvents(); // TODO: This fixes a segfault on Wayland when closing. Remove after updating glfw to 3.5.
|
||||||
glfwTerminate();
|
glfwTerminate();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user