1
0

cLuaState: Fixed errors on non-existent callbacks.

This mostly affected table-based callbacks, such as the cLineBlockTracer. If a callback didn't exist, the code would still push its arguments on the stack, breaking the next callback.
This commit is contained in:
Mattes D 2014-10-31 19:25:31 +01:00
parent e2ffd5429c
commit 2b7f34515a

View File

@ -247,7 +247,11 @@ public:
template <typename FnT, typename... Args>
bool Call(const FnT & a_Function, Args &&... args)
{
PushFunction(a_Function);
if (!PushFunction(a_Function))
{
// Pushing the function failed
return false;
}
return PushCallPop(args...);
}