diff --git a/code/qcommon/vm.c b/code/qcommon/vm.c index c500aea6..ba9886cd 100644 --- a/code/qcommon/vm.c +++ b/code/qcommon/vm.c @@ -765,14 +765,14 @@ locals from sp ============== */ -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;