forked from Mirror/wren
Don't confuse the GC if a collection occurs after a compile error.
This commit is contained in:
@ -1297,6 +1297,8 @@ static ObjFn* endCompiler(Compiler* compiler,
|
||||
// anyway.
|
||||
if (compiler->parser->hasError)
|
||||
{
|
||||
wrenSetCompiler(compiler->parser->vm, compiler->parent);
|
||||
|
||||
// Free the code since it won't be used.
|
||||
freeCompiler(compiler);
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user