diff --git a/src/script/context.cpp b/src/script/context.cpp index c4cea527..00127689 100644 --- a/src/script/context.cpp +++ b/src/script/context.cpp @@ -121,6 +121,7 @@ ScriptValueP Context::eval(const Script& script, bool useScope) { // get function and call stack.back() = stack.back()->eval(*this); } catch (const Error& e) { + closeScope(scope); // try to determine what named function was called // the instructions for this look like: // I_GET_VAR name of function