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:
Devin J. Pohly
2016-05-24 16:25:23 -04:00
parent ddb91608ad
commit 10ddd549f3
3 changed files with 5 additions and 0 deletions
+2
View File
@@ -487,6 +487,7 @@ Actor *NoteSkinManager::LoadActor( const RString &sButton, const RString &sEleme
if( !PushActorTemplate(L, sButton, sElement, bSpriteOnly) )
{
LUA->Release( L );
// ActorUtil will warn about the error
return Sprite::NewBlankSprite();
}
@@ -494,6 +495,7 @@ Actor *NoteSkinManager::LoadActor( const RString &sButton, const RString &sEleme
auto_ptr<XNode> pNode( XmlFileUtil::XNodeFromTable(L) );
if( pNode.get() == NULL )
{
LUA->Release( L );
// XNode will warn about the error
return Sprite::NewBlankSprite();
}