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 )
|
if( apBestSongs[j]->GetDisplayed() != Song::SHOW_ALWAYS )
|
||||||
bFiltered = true;
|
bFiltered = true;
|
||||||
/* Filter out locked songs. */
|
/* 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;
|
bFiltered = true;
|
||||||
if( !bFiltered )
|
if( !bFiltered )
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -1060,6 +1060,7 @@ int main(int argc, char* argv[])
|
|||||||
PROFILEMAN = new ProfileManager;
|
PROFILEMAN = new ProfileManager;
|
||||||
PROFILEMAN->Init(); // must load after SONGMAN
|
PROFILEMAN->Init(); // must load after SONGMAN
|
||||||
UNLOCKMAN = new UnlockManager;
|
UNLOCKMAN = new UnlockManager;
|
||||||
|
SONGMAN->UpdatePopular();
|
||||||
SONGMAN->UpdatePreferredSort();
|
SONGMAN->UpdatePreferredSort();
|
||||||
|
|
||||||
/* This shouldn't need to be here; if it's taking long enough that this is
|
/* This shouldn't need to be here; if it's taking long enough that this is
|
||||||
|
|||||||
Reference in New Issue
Block a user