From 9b782ff6d37c6d452b6648ba16c9d3ec49c07f47 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Tue, 27 Nov 2018 22:19:18 -0500 Subject: [PATCH] fix table iterators --- single/sol/sol.hpp | 6 +++--- single/sol/sol_forward.hpp | 4 ++-- sol/table_iterator.hpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/single/sol/sol.hpp b/single/sol/sol.hpp index b8217fdf..4e4e9a01 100644 --- a/single/sol/sol.hpp +++ b/single/sol/sol.hpp @@ -20,8 +20,8 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // This file was generated with a script. -// Generated 2018-11-27 15:20:21.502906 UTC -// This header was generated with sol v2.20.6 (revision f404395) +// Generated 2018-11-28 03:18:56.546705 UTC +// This header was generated with sol v2.20.6 (revision 4a0f382) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_HPP @@ -19972,7 +19972,7 @@ namespace sol { if (keyidx != -1) { stack::remove(ref.lua_state(), keyidx, 1); } - if (ref.valid()) { + if (ref.lua_state() != nullptr && ref.valid()) { stack::remove(ref.lua_state(), tableidx, 1); } } diff --git a/single/sol/sol_forward.hpp b/single/sol/sol_forward.hpp index d640358c..e53faa64 100644 --- a/single/sol/sol_forward.hpp +++ b/single/sol/sol_forward.hpp @@ -20,8 +20,8 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // This file was generated with a script. -// Generated 2018-11-27 15:20:22.201348 UTC -// This header was generated with sol v2.20.6 (revision f404395) +// Generated 2018-11-28 03:18:56.778088 UTC +// This header was generated with sol v2.20.6 (revision 4a0f382) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP diff --git a/sol/table_iterator.hpp b/sol/table_iterator.hpp index fdfe6be4..f7816811 100644 --- a/sol/table_iterator.hpp +++ b/sol/table_iterator.hpp @@ -109,7 +109,7 @@ namespace sol { if (keyidx != -1) { stack::remove(ref.lua_state(), keyidx, 1); } - if (ref.valid()) { + if (ref.lua_state() != nullptr && ref.valid()) { stack::remove(ref.lua_state(), tableidx, 1); } }