[qw] Check for null file before checking size

Fixes a segfault when downloading a file that doesn't exist.
This commit is contained in:
Bill Currie 2021-07-22 18:02:36 +09:00
parent e089234f38
commit b3e7b52696
1 changed files with 1 additions and 1 deletions

View File

@ -758,7 +758,7 @@ SV_BeginDownload_f (void *unused)
file = _QFS_FOpenFile (name, !zip);
host_client->download = file;
host_client->downloadsize = Qfilesize (file);
host_client->downloadsize = file ? Qfilesize (file) : 0;
host_client->downloadcount = 0;
if (!host_client->download