From ce2df6de06c38ad15e3c7b4aab2a95ed7a526e64 Mon Sep 17 00:00:00 2001 From: Ben Kuper Date: Tue, 27 Aug 2024 18:13:03 -0400 Subject: [PATCH] fix crash in crash routine --- Source/Main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Main.cpp b/Source/Main.cpp index 4244692c1..e879fbf2a 100644 --- a/Source/Main.cpp +++ b/Source/Main.cpp @@ -85,10 +85,13 @@ void ChataigneApplication::handleCrashed() { crashSent = true; MatomoAnalytics::getInstance()->log(MatomoAnalytics::CRASH); + MatomoAnalytics::getInstance()->signalThreadShouldExit(); while (MatomoAnalytics::getInstance()->isThreadRunning()) { //wait until thread is done - Thread::getCurrentThread()->wait(10); + Thread* t = Thread::getCurrentThread(); + if (t == nullptr) break; + t->wait(10); } }