Throw error when making calls to empty VM

This commit is contained in:
Thilo Schulz 2011-09-27 21:17:21 +00:00
parent 8a500d71da
commit acc2da023c

View file

@ -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;