Changed NoteSkinManager::LoadActor to always return a Sprite on failure because some elements must be a sprite.

This commit is contained in:
Kyzentun
2014-07-19 10:11:14 -06:00
committed by Jonathan Payne
parent 32664e7e17
commit 4dfeb3eb89
+2 -6
View File
@@ -438,18 +438,14 @@ Actor *NoteSkinManager::LoadActor( const RString &sButton, const RString &sEleme
if( !PushActorTemplate(L, sButton, sElement, bSpriteOnly) )
{
// ActorUtil will warn about the error
return new Actor;
return new Sprite;
}
auto_ptr<XNode> pNode( XmlFileUtil::XNodeFromTable(L) );
if( pNode.get() == NULL )
{
// XNode will warn about the error
if(bSpriteOnly)
{
return new Sprite;
}
return new Actor;
return new Sprite;
}
LUA->Release( L );