From 05b9166c25e5a63c34a9fe6270096277359942e3 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 23 Mar 2004 00:42:56 +0000 Subject: [PATCH] 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. --- simgear/nasal/code.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.39.5