16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 03:09:18 +02:00

Fix crash on exit

This commit is contained in:
2025-11-16 16:32:48 +01:00
parent a7b44892b7
commit acc4cca4c2

View File

@@ -615,8 +615,19 @@ eu07_application::release_python_lock() {
void
eu07_application::exit() {
Global.applicationQuitOrder = true;
Global.threads["LogService"].join(); // kill log service
Global.threads["DiscordRPC"].join(); // kill DiscordRPC service
auto it = Global.threads.find("LogService");
if (it != Global.threads.end())
{
if (it->second.joinable())
it->second.join();
}
it = Global.threads.find("DiscordRPC");
if (it != Global.threads.end())
{
if (it->second.joinable())
it->second.join();
}
for (auto &mode : m_modes)