From 7bfb3b56fa6f370cbd90ef0a64df9eca3a908b40 Mon Sep 17 00:00:00 2001 From: Spoike Date: Sat, 11 Feb 2017 17:16:51 +0000 Subject: [PATCH] small fix for a crash that I added at the last moment... git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5056 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_main.c | 3 +++ engine/common/fs.c | 2 +- engine/common/log.c | 3 --- engine/server/sv_main.c | 3 +++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index 25de9c125..347cd37fd 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -5660,6 +5660,9 @@ void Host_FinishLoading(void) r_blockvidrestart = 2; Menu_Download_Update(); + + IPLog_Merge_File("iplog.txt"); + IPLog_Merge_File("iplog.dat"); //legacy crap, for compat with proquake } #ifdef ANDROID diff --git a/engine/common/fs.c b/engine/common/fs.c index 493671972..8d18ca0f8 100644 --- a/engine/common/fs.c +++ b/engine/common/fs.c @@ -1666,7 +1666,7 @@ qboolean FS_NativePath(const char *fname, enum fs_relative relativeto, char *out last = NULL; for (i = 0; i < sizeof(fs_manifest->gamepath)/sizeof(fs_manifest->gamepath[0]); i++) { - if (fs_manifest->gamepath[i].base && fs_manifest->gamepath[i].path) + if (fs_manifest && fs_manifest->gamepath[i].base && fs_manifest->gamepath[i].path) { if (*fs_manifest->gamepath[i].path == '*') continue; diff --git a/engine/common/log.c b/engine/common/log.c index 8fbae6f29..bea651ab2 100644 --- a/engine/common/log.c +++ b/engine/common/log.c @@ -638,9 +638,6 @@ void Log_Init(void) Cmd_AddCommand("ipmerge", IPLog_Merge_f); Cmd_AddCommand("ipdump", IPLog_Dump_f); - IPLog_Merge_File("iplog.txt"); - IPLog_Merge_File("iplog.dat"); //legacy crap, for compat with proquake - // cmd line options, debug options #ifdef CRAZYDEBUGGING Cvar_ForceSet(&log_enable[LOG_CONSOLE], "1"); diff --git a/engine/server/sv_main.c b/engine/server/sv_main.c index b19911908..f429b198b 100644 --- a/engine/server/sv_main.c +++ b/engine/server/sv_main.c @@ -5439,6 +5439,9 @@ void SV_Init (quakeparms_t *parms) } #endif + IPLog_Merge_File("iplog.txt"); + IPLog_Merge_File("iplog.dat"); //legacy crap, for compat with proquake + // if a map wasn't specified on the command line, spawn start.map //aliases require that we flush the cbuf in order to actually see the results. if (sv.state == ss_dead && Cmd_AliasExist("startmap_dm", RESTRICT_LOCAL))