diff options
author | Rene Stoeckel <[email protected]> | 2005-12-17 20:32:01 +0000 |
---|---|---|
committer | Rene Stoeckel <[email protected]> | 2005-12-17 20:32:01 +0000 |
commit | f20c4be009fb4f9b93112c4a6f71916fe06db128 (patch) | |
tree | 3b2bd1009d4acf6bb2a249b33ba208360e7cc5db /src/jake2 | |
parent | fbd01d63a6273c04c5016a614b8334ea1b000c1a (diff) |
npe fix in SV_BeginDownload_f
Diffstat (limited to 'src/jake2')
-rw-r--r-- | src/jake2/server/SV_USER.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/jake2/server/SV_USER.java b/src/jake2/server/SV_USER.java index 4777c8f..1c9bcf2 100644 --- a/src/jake2/server/SV_USER.java +++ b/src/jake2/server/SV_USER.java @@ -19,7 +19,7 @@ */ // Created on 17.01.2004 by RST. -// $Id: SV_USER.java,v 1.9 2005-11-16 22:24:53 salomo Exp $ +// $Id: SV_USER.java,v 1.10 2005-12-17 20:32:01 salomo Exp $ package jake2.server; import jake2.Defines; @@ -417,6 +417,13 @@ public class SV_USER { FS.FreeFile(SV_MAIN.sv_client.download); SV_MAIN.sv_client.download = FS.LoadFile(name); + + // rst: this handles loading errors, no message yet visible + if (SV_MAIN.sv_client.download == null) + { + return; + } + SV_MAIN.sv_client.downloadsize = SV_MAIN.sv_client.download.length; SV_MAIN.sv_client.downloadcount = offset; @@ -426,7 +433,7 @@ public class SV_USER { if (SV_MAIN.sv_client.download == null // special check for maps, if it // came from a pak file, don't // allow - // download ZOID + // download ZOID || (name.startsWith("maps/") && FS.file_from_pak != 0)) { Com.DPrintf("Couldn't download " + name + " to " + SV_MAIN.sv_client.name + "\n"); |