Fix crash caused by loading edit courses from profiles.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user