mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-22 02:11:19 +00:00
don't try to open the dirconf file if it hasn't been specified
This commit is contained in:
parent
eae39106c4
commit
ce0e0d421e
1 changed files with 8 additions and 5 deletions
|
@ -537,15 +537,18 @@ qfs_build_gamedir (const char **list)
|
|||
static void
|
||||
qfs_load_config (void)
|
||||
{
|
||||
QFile *f;
|
||||
QFile *f = 0;
|
||||
int len;
|
||||
char *buf;
|
||||
char *dirconf;
|
||||
|
||||
dirconf = expand_squiggle (fs_dirconf->string);
|
||||
if (!(f = Qopen (dirconf, "rt")))
|
||||
Sys_DPrintf ("Could not load `%s', using builtin defaults\n", dirconf);
|
||||
free (dirconf);
|
||||
if (*fs_dirconf->string) {
|
||||
dirconf = expand_squiggle (fs_dirconf->string);
|
||||
if (!(f = Qopen (dirconf, "rt")))
|
||||
Sys_DPrintf ("Could not load `%s', using builtin defaults\n",
|
||||
dirconf);
|
||||
free (dirconf);
|
||||
}
|
||||
if (!f)
|
||||
goto no_config;
|
||||
|
||||
|
|
Loading…
Reference in a new issue