shithub: choc

Download patch

ref: 5a1443a3685eb02b3b97b0be74ebf5936546d02b
parent: 45359954fe5054f27637962a272177d9c8115b90
author: Simon Howard <[email protected]>
date: Sun Jun 7 10:20:46 EDT 2009

Exit with an error on failure to allocate zone memory.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1564

--- a/src/i_system.c
+++ b/src/i_system.c
@@ -95,6 +95,11 @@
     *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);