commit 5a1443a3685eb02b3b97b0be74ebf5936546d02b
Author: Simon Howard <fraggle@gmail.com>
AuthorDate: Sun Jun 7 14:20:46 2009 +0000
Commit: Simon Howard <fraggle@gmail.com>
CommitDate: Sun Jun 7 14:20:46 2009 +0000
Exit with an error on failure to allocate zone memory.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1564
---
src/i_system.c | 5 +++++
1 file changed, 5 insertions(+)
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);