From 9922cbb3db651b814579881a582160feff92c30a Mon Sep 17 00:00:00 2001 From: James Roseborough Date: Wed, 25 Jan 2012 03:46:53 +0000 Subject: [PATCH] Improve detection and handling of orphaned coroutine threads. --- src/core/org/luaj/vm2/LuaThread.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/org/luaj/vm2/LuaThread.java b/src/core/org/luaj/vm2/LuaThread.java index a6f25508..47448088 100644 --- a/src/core/org/luaj/vm2/LuaThread.java +++ b/src/core/org/luaj/vm2/LuaThread.java @@ -339,9 +339,9 @@ public class LuaThread extends LuaValue { * @see DebugLib */ public final void onReturn() { + functions[--calls] = null; if (DebugLib.DEBUG_ENABLED) DebugLib.debugOnReturn(running_thread, calls); - functions[--calls] = null; } /**