diff options
author | chai <chaifix@163.com> | 2019-03-29 22:28:40 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-03-29 22:28:40 +0800 |
commit | 157530b8b6e11efc5573d5a0db8987a440197aa1 (patch) | |
tree | f9df79c013885e13dc81e7046c9828037eb29e2e /source/3rd-party/Luax/luax_ref.cpp | |
parent | e37b1dfd022bda4dfdcba243c0543c62c89db32f (diff) |
*misc
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) { |