don't try to open the dirconf file if it hasn't been specified

This commit is contained in:
Bill Currie 2007-04-07 12:17:01 +00:00 committed by Jeff Teunissen
parent eae39106c4
commit ce0e0d421e

View file

@ -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;