don't unload edit steps while they're in use

This commit is contained in:
Glenn Maynard
2007-05-31 18:24:22 +00:00
parent 69e23dc79a
commit f2671274da
6 changed files with 35 additions and 8 deletions
+4 -1
View File
@@ -1585,8 +1585,11 @@ void SongManager::FreeAllLoadedFromProfile( ProfileSlot slot )
RefreshCourseGroupInfo();
/* Free profile steps. */
set<Steps*> setInUse;
if( STATSMAN )
STATSMAN->GetStepsInUse( setInUse );
FOREACH( Song*, m_pSongs, s )
(*s)->FreeAllLoadedFromProfile( slot );
(*s)->FreeAllLoadedFromProfile( slot, &setInUse );
// After freeing some Steps pointers, the cache will be invalid.
StepsID::ClearCache();