diff --git a/src/Actor.cpp b/src/Actor.cpp index d2264cbf32..b2863fc91b 100644 --- a/src/Actor.cpp +++ b/src/Actor.cpp @@ -1126,6 +1126,12 @@ void Actor::RunCommands( const LuaReference& cmds, const LuaReference *pParamTab // function cmds.PushSelf( L ); + if( lua_isnil(L, -1) ) + { + LOG->Warn("Error compiling commands"); + LUA->Release(L); + return; + } // 1st parameter this->PushSelf( L );