From 9f875e9bfbc1ed9775418cdba59a9363fd5c9391 Mon Sep 17 00:00:00 2001 From: "Devin J. Pohly" Date: Fri, 1 Nov 2013 21:52:56 -0400 Subject: [PATCH] warn on bad UpdateFunction --- src/ActorFrame.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ActorFrame.cpp b/src/ActorFrame.cpp index dc43140e76..59d87b2548 100644 --- a/src/ActorFrame.cpp +++ b/src/ActorFrame.cpp @@ -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;