From bcbe5eb105fb6671166e15c66bab5bd25a59b466 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sat, 30 Aug 2025 11:19:40 +0200 Subject: [PATCH] fix: Use Win32 functions to terminate thread on Windows --- main/gui/source/crash_handlers.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main/gui/source/crash_handlers.cpp b/main/gui/source/crash_handlers.cpp index 79c2bbcaf..f7184890c 100644 --- a/main/gui/source/crash_handlers.cpp +++ b/main/gui/source/crash_handlers.cpp @@ -85,7 +85,11 @@ namespace hex::crash { }); // Terminate this thread - pthread_kill(pthread_self(), SIGABRT); + #if defined(_MSC_VER) + TerminateThread(GetCurrentThread(), EXIT_FAILURE); + #else + pthread_kill(pthread_self(), SIGABRT); + #endif while (true) { std::this_thread::sleep_for(std::chrono::milliseconds(100));