correct locking semantics for LuaReference (SGameplay commit in a moment)

This commit is contained in:
Glenn Maynard
2005-06-16 03:13:06 +00:00
parent 63eebeb75e
commit 1e02955e63
4 changed files with 80 additions and 50 deletions
+4 -1
View File
@@ -88,6 +88,8 @@ ActorCommands::ActorCommands( const CString &sCommands )
void ActorCommands::Register()
{
Lua *L = LUA->Get();
CString sError;
if( !LUA->RunScript( m_sLuaFunction, "in", sError, 1 ) )
{
@@ -95,7 +97,8 @@ void ActorCommands::Register()
}
/* The function is now on the stack. */
this->SetFromStack();
this->SetFromStack( L );
LUA->Release( L );
}