aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2008-05-31 23:26:41 +0000
committerJohannes Schickel2008-05-31 23:26:41 +0000
commit7d8a97b0afeb86a178914c351f48f1da5ccd0eef (patch)
tree2c71369495e2b149d3c6b1cc90d8146c4f5dff30
parent7a2d85c07c2c54ba779b221187a3779845f8bdf3 (diff)
downloadscummvm-rg350-7d8a97b0afeb86a178914c351f48f1da5ccd0eef.tar.gz
scummvm-rg350-7d8a97b0afeb86a178914c351f48f1da5ccd0eef.tar.bz2
scummvm-rg350-7d8a97b0afeb86a178914c351f48f1da5ccd0eef.zip
Added error calls when out of memory while uncompressing HoF installer files.
svn-id: r32449
-rw-r--r--engines/kyra/resource.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp
index 226a8af523..73ff591792 100644
--- a/engines/kyra/resource.cpp
+++ b/engines/kyra/resource.cpp
@@ -1396,11 +1396,13 @@ bool CompLoaderInsHof::loadFile(CompFileMap &loadTo) const {
tmpFile.seek(pos);
outbuffer = new uint8[outsize];
- assert(outbuffer);
+ if (!outbuffer)
+ error("Out of memory: Can't uncompress installer files");
if (!inbuffer) {
inbuffer = new uint8[insize];
- assert(inbuffer);
+ if (!inbuffer)
+ error("Out of memory: Can't uncompress installer files");
}
if ((pos + insize) > size) {