Skip to content

Commit e330f0a

Browse files
committed
Adds a nullcheck to ExecutionInterpretedOut for when resultsBVP is null
Signed-off-by: AMZN-Gene <[email protected]>
1 parent 373f177 commit e330f0a

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedOut.cpp

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,21 +133,16 @@ namespace ScriptCanvas
133133
{
134134
Execution::StackPush(m_lua, behaviorContext, argsBVPs[i]);
135135
}
136+
136137
// Lua: lambda, args...
137138
const int result = InterpretedSafeCall(m_lua, numArguments, 1);
138-
// Lua: ?
139-
if (result != LUA_OK)
140-
{
141-
// Lua: error
142-
lua_pop(m_lua, 1);
143-
}
144-
else
139+
140+
if(result == LUA_OK && resultBVP)
145141
{
146-
// Lua: result
147142
Execution::StackRead(m_lua, behaviorContext, -1, *resultBVP, nullptr);
148-
lua_pop(m_lua, 1);
149143
}
150-
// Lua:
144+
145+
lua_pop(m_lua, 1);
151146
}
152147
}
153148
}

0 commit comments

Comments
 (0)