warn on bad DrawFunction
This commit is contained in:
+5
-1
@@ -236,7 +236,11 @@ void ActorFrame::DrawPrimitives()
|
|||||||
{
|
{
|
||||||
Lua *L = LUA->Get();
|
Lua *L = LUA->Get();
|
||||||
m_DrawFunction.PushSelf( L );
|
m_DrawFunction.PushSelf( L );
|
||||||
ASSERT( !lua_isnil(L, -1) );
|
if( lua_isnil(L, -1) )
|
||||||
|
{
|
||||||
|
LOG->Warn( "Error compiling DrawFunction" );
|
||||||
|
return;
|
||||||
|
}
|
||||||
this->PushSelf( L );
|
this->PushSelf( L );
|
||||||
RString sError;
|
RString sError;
|
||||||
if( !LuaHelpers::RunScriptOnStack(L, sError, 1, 0) ) // 1 arg, 0 results
|
if( !LuaHelpers::RunScriptOnStack(L, sError, 1, 0) ) // 1 arg, 0 results
|
||||||
|
|||||||
Reference in New Issue
Block a user