fix: replace silent early return with assertion in wrenFreeVM for freed VM detection

This commit is contained in:
Bob Nystrom
2015-03-20 15:00:52 +00:00
parent 15e965c5eb
commit 28fdc8372f
+2 -1
View File
@@ -81,7 +81,8 @@ WrenVM* wrenNewVM(WrenConfiguration* configuration)
void wrenFreeVM(WrenVM* vm)
{
if( vm == NULL || vm->methodNames.count == 0 ) return;
ASSERT(vm->methodNames.count > 0, "VM appears to have already been freed.");
// Free all of the GC objects.
Obj* obj = vm->first;
while (obj != NULL)