diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 9cb6cbe6..ec4111f6 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -3031,7 +3031,7 @@ INT32 I_StartupSystem(void) SDL_GetVersion(&SDLlinked); #ifdef HAVE_THREADS I_start_threads(); - atexit(I_stop_threads); + I_AddExitFunc(I_stop_threads); #endif I_StartupConsole(); I_OutputMsg("Compiled for SDL version: %d.%d.%d\n",