diff --git a/src/events/SDL_quit.c b/src/events/SDL_quit.c index 5456203ee2..0e5f3e6c6d 100644 --- a/src/events/SDL_quit.c +++ b/src/events/SDL_quit.c @@ -46,8 +46,10 @@ static bool send_foregrounding_pending = false; static void SDL_HandleSIG(int sig) { - // Reset the signal handler +#ifndef HAVE_SIGACTION + // Reset the signal handler if it was installed with signal() (void)signal(sig, SDL_HandleSIG); +#endif // Send a quit event next time the event loop pumps. // We can't send it in signal handler; SDL_malloc() might be interrupted!