diff options
Diffstat (limited to 'source/3rd-party/Luax/luax_ref.cpp')
-rw-r--r-- | source/3rd-party/Luax/luax_ref.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/3rd-party/Luax/luax_ref.cpp b/source/3rd-party/Luax/luax_ref.cpp index 78596e3..d4be775 100644 --- a/source/3rd-party/Luax/luax_ref.cpp +++ b/source/3rd-party/Luax/luax_ref.cpp @@ -23,7 +23,7 @@ namespace Luax { assert(mRefID != LUA_NOREF); - LuaxVM* vm = LuaxVM::TryGetVM(state); + LuaxVM* vm = state.GetVM(); if (!vm) return false; if (mMode == STRONG_REF) { @@ -37,13 +37,15 @@ namespace Luax } else { + state.PushNil(); return false; } + return true; } void LuaxRef::SetRef(LuaxState& state, int idx) { - LuaxVM* vm = LuaxVM::TryGetVM(state); + LuaxVM* vm = state.GetVM(); if (!vm) return; if (mMode == STRONG_REF) { |