From: andy Date: Tue, 23 Mar 2004 00:42:56 +0000 (+0000) Subject: Fix GC interaction. The "me" reference to a method call was being X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=05b9166c25e5a63c34a9fe6270096277359942e3;p=simgear.git Fix GC interaction. The "me" reference to a method call was being popped off the stack in a situation where it could be garbage collected. I believe this is the source of the spurious "non-object have no members" bug that has been reported. --- diff --git a/simgear/nasal/code.c b/simgear/nasal/code.c index 3bd1e5ab..02829f71 100644 --- a/simgear/nasal/code.c +++ b/simgear/nasal/code.c @@ -454,6 +454,7 @@ static void run1(struct Context* ctx, struct Frame* f, naRef code) break; case OP_MCALL: c = POP(ctx); b = POP(ctx); a = POP(ctx); // a,b,c = obj, func, args + naVec_append(ctx->temps, a); setupFuncall(ctx, b, c); naHash_set(ctx->fStack[ctx->fTop-1].locals, ctx->meRef, a); break;