fix sdl shutdown crash