aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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) {