Browse Source

Fix: reset order

Akeit0 10 months ago
parent
commit
b94c674798
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/Lua/Runtime/LuaVirtualMachine.cs

+ 1 - 2
src/Lua/Runtime/LuaVirtualMachine.cs

@@ -932,14 +932,13 @@ public static partial class LuaVirtualMachine
         }
         catch (Exception e)
         {
-            
             context.State.CloseUpValues(context.Thread, context.FrameBase);
             LuaValueArrayPool.Return1024(context.ResultsBuffer, true);
             if (e is not LuaRuntimeException)
             {
                 var newException = new LuaRuntimeException(context.State.GetTraceback(), e);
-                context = default;
                 context.PopOnTopCallStackFrames();
+                context = default;
                 throw newException;
             }