fix: reset API stack to NULL when fiber is aborted in wrenCall to prevent broken state on reuse

This commit is contained in:
Bob Nystrom
2016-11-01 15:40:16 +00:00
parent 77f7f759ff
commit 6e8a798959
8 changed files with 68 additions and 7 deletions
+1
View File
@@ -400,6 +400,7 @@ static void runtimeError(WrenVM* vm)
// If we got here, nothing caught the error, so show the stack trace.
wrenDebugPrintStackTrace(vm);
vm->fiber = NULL;
vm->apiStack = NULL;
}
// Aborts the current fiber with an appropriate method not found error for a