From c3fd71dd7697543f71bef763b9022aa9ed7c1361 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Mon, 18 Jul 2005 17:34:00 +0000 Subject: [PATCH] fix assert double-loading the static song background --- stepmania/src/Background.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/stepmania/src/Background.cpp b/stepmania/src/Background.cpp index 053c906ad5..fb1c7f4a35 100644 --- a/stepmania/src/Background.cpp +++ b/stepmania/src/Background.cpp @@ -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 ); + } }