mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 11:39:19 +02:00
Fix crash on exit
This commit is contained in:
@@ -615,8 +615,19 @@ eu07_application::release_python_lock() {
|
|||||||
void
|
void
|
||||||
eu07_application::exit() {
|
eu07_application::exit() {
|
||||||
Global.applicationQuitOrder = true;
|
Global.applicationQuitOrder = true;
|
||||||
Global.threads["LogService"].join(); // kill log service
|
auto it = Global.threads.find("LogService");
|
||||||
Global.threads["DiscordRPC"].join(); // kill DiscordRPC service
|
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)
|
for (auto &mode : m_modes)
|
||||||
|
|||||||
Reference in New Issue
Block a user