mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
[qw] Check for null file before checking size
Fixes a segfault when downloading a file that doesn't exist.
This commit is contained in:
parent
e089234f38
commit
b3e7b52696
1 changed files with 1 additions and 1 deletions
|
@ -758,7 +758,7 @@ SV_BeginDownload_f (void *unused)
|
||||||
file = _QFS_FOpenFile (name, !zip);
|
file = _QFS_FOpenFile (name, !zip);
|
||||||
|
|
||||||
host_client->download = file;
|
host_client->download = file;
|
||||||
host_client->downloadsize = Qfilesize (file);
|
host_client->downloadsize = file ? Qfilesize (file) : 0;
|
||||||
host_client->downloadcount = 0;
|
host_client->downloadcount = 0;
|
||||||
|
|
||||||
if (!host_client->download
|
if (!host_client->download
|
||||||
|
|
Loading…
Reference in a new issue