[quake3-commits] r1965 - trunk/code/qcommon
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon May 9 11:40:30 EDT 2011
Author: thilo
Date: 2011-05-09 11:40:30 -0400 (Mon, 09 May 2011)
New Revision: 1965
Modified:
trunk/code/qcommon/vm_x86.c
Log:
Add error handling to malloc as well
Modified: trunk/code/qcommon/vm_x86.c
===================================================================
--- trunk/code/qcommon/vm_x86.c 2011-05-06 11:50:26 UTC (rev 1964)
+++ trunk/code/qcommon/vm_x86.c 2011-05-09 15:40:30 UTC (rev 1965)
@@ -1104,6 +1104,8 @@
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 );
More information about the quake3-commits
mailing list