Make sure we always release Lua lock
I have a sneaking suspicion that this also magically fixes memory cards on Linux.
This commit is contained in:
@@ -238,6 +238,7 @@ void ActorFrame::DrawPrimitives()
|
|||||||
m_DrawFunction.PushSelf( L );
|
m_DrawFunction.PushSelf( L );
|
||||||
if( lua_isnil(L, -1) )
|
if( lua_isnil(L, -1) )
|
||||||
{
|
{
|
||||||
|
LUA->Release(L);
|
||||||
LuaHelpers::ReportScriptErrorFmt( "Error compiling DrawFunction" );
|
LuaHelpers::ReportScriptErrorFmt( "Error compiling DrawFunction" );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -487,6 +488,7 @@ void ActorFrame::UpdateInternal( float fDeltaTime )
|
|||||||
m_UpdateFunction.PushSelf( L );
|
m_UpdateFunction.PushSelf( L );
|
||||||
if( lua_isnil(L, -1) )
|
if( lua_isnil(L, -1) )
|
||||||
{
|
{
|
||||||
|
LUA->Release(L);
|
||||||
LuaHelpers::ReportScriptErrorFmt( "Error compiling UpdateFunction" );
|
LuaHelpers::ReportScriptErrorFmt( "Error compiling UpdateFunction" );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -487,6 +487,7 @@ Actor *NoteSkinManager::LoadActor( const RString &sButton, const RString &sEleme
|
|||||||
|
|
||||||
if( !PushActorTemplate(L, sButton, sElement, bSpriteOnly) )
|
if( !PushActorTemplate(L, sButton, sElement, bSpriteOnly) )
|
||||||
{
|
{
|
||||||
|
LUA->Release( L );
|
||||||
// ActorUtil will warn about the error
|
// ActorUtil will warn about the error
|
||||||
return Sprite::NewBlankSprite();
|
return Sprite::NewBlankSprite();
|
||||||
}
|
}
|
||||||
@@ -494,6 +495,7 @@ Actor *NoteSkinManager::LoadActor( const RString &sButton, const RString &sEleme
|
|||||||
auto_ptr<XNode> pNode( XmlFileUtil::XNodeFromTable(L) );
|
auto_ptr<XNode> pNode( XmlFileUtil::XNodeFromTable(L) );
|
||||||
if( pNode.get() == NULL )
|
if( pNode.get() == NULL )
|
||||||
{
|
{
|
||||||
|
LUA->Release( L );
|
||||||
// XNode will warn about the error
|
// XNode will warn about the error
|
||||||
return Sprite::NewBlankSprite();
|
return Sprite::NewBlankSprite();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3142,6 +3142,7 @@ void Player::SetHoldJudgment( TapNote &tn, int iTrack )
|
|||||||
Lua* L = LUA->Get();
|
Lua* L = LUA->Get();
|
||||||
tn.PushSelf(L);
|
tn.PushSelf(L);
|
||||||
msg.SetParamFromStack( L, "TapNote" );
|
msg.SetParamFromStack( L, "TapNote" );
|
||||||
|
LUA->Release( L );
|
||||||
|
|
||||||
MESSAGEMAN->Broadcast( msg );
|
MESSAGEMAN->Broadcast( msg );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user