From 157530b8b6e11efc5573d5a0db8987a440197aa1 Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 29 Mar 2019 22:28:40 +0800 Subject: *misc --- source/3rd-party/Luax/luax_ref.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/3rd-party/Luax/luax_ref.cpp') 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) { -- cgit v1.1-26-g67d0