From acc4cca4c2da437d4c5d6edb6f419e5026b32acf Mon Sep 17 00:00:00 2001 From: Hirek Date: Sun, 16 Nov 2025 16:32:48 +0100 Subject: [PATCH] Fix crash on exit --- application.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/application.cpp b/application.cpp index e47839a6..83debea4 100644 --- a/application.cpp +++ b/application.cpp @@ -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)