From 5a1443a3685eb02b3b97b0be74ebf5936546d02b Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 7 Jun 2009 14:20:46 +0000 Subject: 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(+) (limited to 'src/i_system.c') 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); -- cgit v1.2.3