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();