From 9fd547112d6bbcd8468265ac5f1d7188f7a6cb30 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Thu, 4 Jul 2024 21:28:43 +0200 Subject: [PATCH] impr: Only handle SIGINT on release builds so IDEs can fast-kill ImHex --- main/gui/source/crash_handlers.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/main/gui/source/crash_handlers.cpp b/main/gui/source/crash_handlers.cpp index ad05b1c21..600f07d65 100644 --- a/main/gui/source/crash_handlers.cpp +++ b/main/gui/source/crash_handlers.cpp @@ -122,10 +122,12 @@ namespace hex::crash { // Custom signal handler to print various information and a stacktrace when the application crashes static void signalHandler(int signalNumber, const std::string &signalName) { - if (signalNumber == SIGINT) { - ImHexApi::System::closeImHex(); - return; - } + #if !defined (DEBUG) + if (signalNumber == SIGINT) { + ImHexApi::System::closeImHex(); + return; + } + #endif // Reset crash handlers, so we can't have a recursion if this code crashes resetCrashHandlers();