I think I've located this bug.
ufo.exe!Con_SaveConsoleHistory(const char * path=0x00000000) ufo.exe!CL_Shutdown()
ufo.exe!Sys_Error(const char * error=0x005d2f68, ...)
ufo.exe!FixWorkingDirectory() Line 875 + 0xa bytes
ufo.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00161f3f, int nCmdShow=1)
ufo.exe!__tmainCRTStartup() Line 578 + 0x35 bytes C
ufo.exe!WinMainCRTStartup() Line 403 C
It occurs when the working dir path is too long and sys_error is called.
Then Con_SaveConsoleHistory(FS_Gamedir()), but FS_Gamedir returns NULL, because "fs_searchpaths" is a null reference.