Changed NoteSkinManager::LoadActor to always return a Sprite on failure because some elements must be a sprite.
This commit is contained in:
@@ -438,19 +438,15 @@ Actor *NoteSkinManager::LoadActor( const RString &sButton, const RString &sEleme
|
|||||||
if( !PushActorTemplate(L, sButton, sElement, bSpriteOnly) )
|
if( !PushActorTemplate(L, sButton, sElement, bSpriteOnly) )
|
||||||
{
|
{
|
||||||
// ActorUtil will warn about the error
|
// ActorUtil will warn about the error
|
||||||
return new Actor;
|
return new Sprite;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto_ptr<XNode> pNode( XmlFileUtil::XNodeFromTable(L) );
|
auto_ptr<XNode> pNode( XmlFileUtil::XNodeFromTable(L) );
|
||||||
if( pNode.get() == NULL )
|
if( pNode.get() == NULL )
|
||||||
{
|
{
|
||||||
// XNode will warn about the error
|
// XNode will warn about the error
|
||||||
if(bSpriteOnly)
|
|
||||||
{
|
|
||||||
return new Sprite;
|
return new Sprite;
|
||||||
}
|
}
|
||||||
return new Actor;
|
|
||||||
}
|
|
||||||
|
|
||||||
LUA->Release( L );
|
LUA->Release( L );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user