Skip to content

Commit 9ae9a1f

Browse files
committed
Fix table checks
1 parent 0e10b94 commit 9ae9a1f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/extractor/scripting_environment_lua.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ Sol2ScriptingEnvironment::GetStringListFromTable(const std::string &table_name)
943943
auto &context = GetSol2Context();
944944
BOOST_ASSERT(context.state.lua_state() != nullptr);
945945
std::vector<std::string> strings;
946-
if (context.profile_table[table_name])
946+
if (!context.profile_table[table_name])
947947
{
948948
return strings;
949949
}
@@ -965,7 +965,7 @@ Sol2ScriptingEnvironment::GetStringListsFromTable(const std::string &table_name)
965965

966966
auto &context = GetSol2Context();
967967
BOOST_ASSERT(context.state.lua_state() != nullptr);
968-
if (context.profile_table[table_name] == nullptr)
968+
if (!context.profile_table[table_name])
969969
{
970970
return string_lists;
971971
}

0 commit comments

Comments
 (0)