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
+5 -2
View File
@@ -584,8 +584,11 @@ void ScreenManager::PrepareScreen( const RString &sScreenName )
{
LOG->Trace( "Loading screen background \"%s\"", sNewBGA.c_str() );
Actor *pActor = ActorUtil::MakeActor( sNewBGA );
pActor->SetName( sNewBGA );
g_vPreparedBackgrounds.push_back( pActor );
if( pActor != NULL )
{
pActor->SetName( sNewBGA );
g_vPreparedBackgrounds.push_back( pActor );
}
}
}