diff --git a/src/main.c b/src/main.c index fa8ba2d9..1e24ca1e 100644 --- a/src/main.c +++ b/src/main.c @@ -636,9 +636,13 @@ int main(int argc, char* argv[]) #if defined(__ANDROID__) use_error_handler = true; #endif - if (use_error_handler && signal(SIGSEGV, _error_handler) == SIG_ERR) + if (use_error_handler) { - perror("signal"); + if (signal(SIGSEGV, _error_handler) == SIG_ERR || + signal(SIGSYS, _error_handler) == SIG_ERR) + { + perror("signal"); + } } int result = 0;