Ampere discovered that the interpreter would deadlock at runtime if it
hit such a condition during initialization.
// Return early if an error occurred. It will be visible to the
// caller via naGetError().
ctx->error = 0;
- if(setjmp(ctx->jumpHandle))
+ if(setjmp(ctx->jumpHandle)) {
+ if(!ctx->callParent) naModUnlock(ctx);
return naNil();
+ }
if(IS_CCODE(func.ref.ptr.func->code)) {
naCFunction fp = func.ref.ptr.func->code.ref.ptr.ccode->fptr;