From fd3328453b89f074ff454bc608420968e3a891e9 Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Mon, 9 May 2011 15:40:30 +0000 Subject: Add error handling to malloc as well --- src/qcommon/vm_x86.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qcommon/vm_x86.c b/src/qcommon/vm_x86.c index f25be998..afa29d4c 100644 --- a/src/qcommon/vm_x86.c +++ b/src/qcommon/vm_x86.c @@ -1105,6 +1105,8 @@ void VM_Compile( vm_t *vm, vmHeader_t *header ) { Com_Error(ERR_FATAL, "VM_CompileX86: VirtualAlloc failed"); #else vm->codeBase = malloc(compiledOfs); + if(!vm->codeBase) + Com_Error(ERR_FATAL, "VM_CompileX86: malloc failed"); #endif Com_Memcpy( vm->codeBase, buf, compiledOfs ); -- cgit