Fixes an issue that could only ever happen with mvdsv.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2013 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
30fa877587
commit
329f0ca9bf
1 changed files with 4 additions and 1 deletions
|
@ -167,6 +167,9 @@ unsigned char *ReadFile_WINDOWSSUCKS(char *gamedir, char *filename, int *size)
|
|||
FILE *f;
|
||||
char fname[1024];
|
||||
|
||||
if (!*filename)
|
||||
return NULL;
|
||||
|
||||
//try and read it straight out of the file system
|
||||
sprintf(fname, "%s/%s", gamedir, filename);
|
||||
f = fopen(fname, "rb");
|
||||
|
@ -212,7 +215,7 @@ bsp_t *BSP_LoadModel(cluster_t *cluster, char *gamedir, char *bspname)
|
|||
|
||||
bsp_t *bsp;
|
||||
|
||||
if (!gamedir)
|
||||
if (!gamedir || !*gamedir)
|
||||
gamedir = "qw";
|
||||
|
||||
data = ReadFile_WINDOWSSUCKS(gamedir, bspname, &size);
|
||||
|
|
Loading…
Reference in a new issue