[quake3-commits] r2179 - trunk/code/qcommon

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Sep 27 17:17:22 EDT 2011


Author: thilo
Date: 2011-09-27 17:17:21 -0400 (Tue, 27 Sep 2011)
New Revision: 2179

Modified:
   trunk/code/qcommon/vm.c
Log:
Throw error when making calls to empty VM


Modified: trunk/code/qcommon/vm.c
===================================================================
--- trunk/code/qcommon/vm.c	2011-09-27 14:43:20 UTC (rev 2178)
+++ trunk/code/qcommon/vm.c	2011-09-27 21:17:21 UTC (rev 2179)
@@ -765,14 +765,14 @@
 ==============
 */
 
-intptr_t	QDECL VM_Call( vm_t *vm, int callnum, ... ) {
+intptr_t QDECL VM_Call( vm_t *vm, int callnum, ... )
+{
 	vm_t	*oldVM;
 	intptr_t r;
 	int i;
 
-	if ( !vm ) {
-		Com_Error( ERR_FATAL, "VM_Call with NULL vm" );
-	}
+	if(!vm || !vm->name[0])
+		Com_Error(ERR_FATAL, "VM_Call with NULL vm");
 
 	oldVM = currentVM;
 	currentVM = vm;



More information about the quake3-commits mailing list