summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2009-06-07 14:20:46 +0000
committerSimon Howard2009-06-07 14:20:46 +0000
commit5a1443a3685eb02b3b97b0be74ebf5936546d02b (patch)
tree448cba7a30c69a5a15313780b15dac02e25f1d73
parent45359954fe5054f27637962a272177d9c8115b90 (diff)
downloadchocolate-doom-5a1443a3685eb02b3b97b0be74ebf5936546d02b.tar.gz
chocolate-doom-5a1443a3685eb02b3b97b0be74ebf5936546d02b.tar.bz2
chocolate-doom-5a1443a3685eb02b3b97b0be74ebf5936546d02b.zip
Exit with an error on failure to allocate zone memory.
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1564
-rw-r--r--src/i_system.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/i_system.c b/src/i_system.c
index 07218142..714f63cc 100644
--- a/src/i_system.c
+++ b/src/i_system.c
@@ -95,6 +95,11 @@ byte *I_ZoneBase (int *size)
*size = I_GetHeapSize();
zonemem = malloc(*size);
+
+ if (zonemem == NULL)
+ {
+ I_Error("Failed to allocate %i bytes for zone memory", *size);
+ }
printf("zone memory: %p, %x allocated for zone\n",
zonemem, *size);