impr: Only handle SIGINT on release builds so IDEs can fast-kill ImHex

This commit is contained in:
WerWolv 2024-07-04 21:28:43 +02:00
parent 14bfc8af72
commit 9fd547112d
1 changed files with 6 additions and 4 deletions

View File

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