summaryrefslogtreecommitdiff
path: root/src/qcommon
diff options
context:
space:
mode:
Diffstat (limited to 'src/qcommon')
-rw-r--r--src/qcommon/vm_x86.c2
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 );