mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2025-03-22 01:41:01 +00:00
Add error handling to malloc as well
This commit is contained in:
parent
2e3c902da9
commit
36314a1622
1 changed files with 2 additions and 0 deletions
|
@ -1104,6 +1104,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 );
|
||||
|
|
Loading…
Reference in a new issue