warn on bad UpdateFunction

This commit is contained in:
Devin J. Pohly
2013-11-01 21:52:56 -04:00
parent af5022d7a8
commit 9f875e9bfb
+5 -1
View File
@@ -352,7 +352,11 @@ void ActorFrame::UpdateInternal( float fDeltaTime )
{
Lua *L = LUA->Get();
m_UpdateFunction.PushSelf( L );
ASSERT( !lua_isnil(L, -1) );
if( lua_isnil(L, -1) )
{
LOG->Warn( "Error compiling UpdateFunction" );
return;
}
this->PushSelf( L );
lua_pushnumber( L, fDeltaTime );
RString sError;