Check MakeActor rvs for NULL

This commit is contained in:
Devin J. Pohly
2013-11-02 04:11:30 -04:00
parent 5d9c3aaa59
commit 4298f2542d
8 changed files with 42 additions and 15 deletions
+4 -1
View File
@@ -107,7 +107,10 @@ void OptionRowType::Load( const RString &sMetricsGroup, Actor *pParent )
m_textTitle.SetName( "Title" );
ActorUtil::LoadAllCommandsAndSetXY( m_textTitle, sMetricsGroup );
m_sprFrame.Load( ActorUtil::MakeActor( THEME->GetPathG(sMetricsGroup,"Frame"), pParent ) );
Actor *pActor = ActorUtil::MakeActor( THEME->GetPathG(sMetricsGroup,"Frame"), pParent );
if( pActor == NULL )
pActor = new Actor;
m_sprFrame.Load( pActor );
m_sprFrame->SetName( "Frame" );
ActorUtil::LoadAllCommandsAndSetXY( m_sprFrame, sMetricsGroup );