fix assert double-loading the static song background

This commit is contained in:
Chris Danford
2005-07-18 17:34:00 +00:00
parent c76799ffa0
commit c3fd71dd76
+6 -2
View File
@@ -643,8 +643,12 @@ void BackgroundImpl::LoadFromSong( const Song* pSong )
if( bStaticBackgroundUsed )
{
bool bSuccess = mainlayer.CreateBackground( m_pSong, STATIC_BACKGROUND_DEF );
ASSERT( bSuccess );
bool bIsAlreadyLoaded = mainlayer.m_BGAnimations.find(STATIC_BACKGROUND_DEF) != mainlayer.m_BGAnimations.end();
if( !bIsAlreadyLoaded )
{
bool bSuccess = mainlayer.CreateBackground( m_pSong, STATIC_BACKGROUND_DEF );
ASSERT( bSuccess );
}
}