Fix crash caused by loading edit courses from profiles.

This commit is contained in:
Steve Checkoway
2006-06-14 05:43:50 +00:00
parent ff57da3b77
commit 288d9c70e5
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -1390,7 +1390,8 @@ void SongManager::UpdatePopular()
if( apBestSongs[j]->GetDisplayed() != Song::SHOW_ALWAYS )
bFiltered = true;
/* Filter out locked songs. */
if( UNLOCKMAN->SongIsLocked(apBestSongs[j]) )
// XXX Hack, this depends on UNLOCKMAN being around.
if( UNLOCKMAN && UNLOCKMAN->SongIsLocked(apBestSongs[j]) )
bFiltered = true;
if( !bFiltered )
continue;
+1
View File
@@ -1060,6 +1060,7 @@ int main(int argc, char* argv[])
PROFILEMAN = new ProfileManager;
PROFILEMAN->Init(); // must load after SONGMAN
UNLOCKMAN = new UnlockManager;
SONGMAN->UpdatePopular();
SONGMAN->UpdatePreferredSort();
/* This shouldn't need to be here; if it's taking long enough that this is