summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThilo Schulz <arny@ats.s.bawue.de>2011-09-27 21:17:21 +0000
committerTim Angus <tim@ngus.net>2013-01-10 23:38:28 +0000
commit73d0e34b848459ed8f0221553fd4661360e489dd (patch)
tree6496b30cfac5febb27343879cbec9ea47e8ac84a
parent36154934f5c0472b324f9054bee95af4b9bd94a7 (diff)
Throw error when making calls to empty VM
-rw-r--r--src/qcommon/vm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qcommon/vm.c b/src/qcommon/vm.c
index 702bdd28..7baf9321 100644
--- a/src/qcommon/vm.c
+++ b/src/qcommon/vm.c
@@ -766,14 +766,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;