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.
|
// anyway.
|
||||||
if (compiler->parser->hasError)
|
if (compiler->parser->hasError)
|
||||||
{
|
{
|
||||||
|
wrenSetCompiler(compiler->parser->vm, compiler->parent);
|
||||||
|
|
||||||
// Free the code since it won't be used.
|
// Free the code since it won't be used.
|
||||||
freeCompiler(compiler);
|
freeCompiler(compiler);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user