From 7d8a97b0afeb86a178914c351f48f1da5ccd0eef Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 31 May 2008 23:26:41 +0000 Subject: Added error calls when out of memory while uncompressing HoF installer files. svn-id: r32449 --- engines/kyra/resource.cpp | 6 ++++-- 1 file 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) { -- cgit v1.2.3