diff options
author | Thilo Schulz <arny@ats.s.bawue.de> | 2011-05-09 15:40:30 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-09 21:38:37 +0000 |
commit | fd3328453b89f074ff454bc608420968e3a891e9 (patch) | |
tree | fad2555d16d913f56f59910f014b0ab7f9c2fba9 /src/qcommon | |
parent | c1555cf88d8ed6d4e1cc3d302148fbaf6cca39a4 (diff) |
Add error handling to malloc as well
Diffstat (limited to 'src/qcommon')
-rw-r--r-- | src/qcommon/vm_x86.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 ); |