From ce0e0d421e832647dad16adc77fde78fc4d8efcc Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sat, 7 Apr 2007 12:17:01 +0000 Subject: [PATCH] don't try to open the dirconf file if it hasn't been specified --- libs/util/quakefs.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libs/util/quakefs.c b/libs/util/quakefs.c index 327abcb69..281804275 100644 --- a/libs/util/quakefs.c +++ b/libs/util/quakefs.c @@ -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;