From a285415b01755b8945068976f856af67968a754d Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Wed, 26 Jan 2011 02:34:30 +0100 Subject: [PATCH] One more fix for the trace flush logic. Sigh. --- src/lj_trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lj_trace.c b/src/lj_trace.c index cc42dffe..da20f991 100644 --- a/src/lj_trace.c +++ b/src/lj_trace.c @@ -226,7 +226,7 @@ static void trace_flushroot(jit_State *J, GCtrace *T) /* Unlink root trace from chain anchored in prototype. */ if (pt->trace == T->traceno) { /* Trace is first in chain. Easy. */ pt->trace = T->nextroot; - } else { /* Otherwise search in chain of root traces. */ + } else if (pt->trace) { /* Otherwise search in chain of root traces. */ GCtrace *T2 = traceref(J, pt->trace); if (T2) { for (; T2->nextroot; T2 = traceref(J, T2->nextroot))