Changed GameState::UnjoinPlayer to actually follow its own comment and unjoin the player from STATSMAN first, instead of unjoining from PROFILEMAN, then STATSMAN, then PROFILEMAN again. Changed ProfileManager::UnloadProfile to skip unloading if the profile wasn't actually loaded in the first place.

This commit is contained in:
Kyzentun
2014-03-10 21:54:53 -06:00
parent a428e16cc8
commit 27dc958970
3 changed files with 24 additions and 7 deletions
+6
View File
@@ -349,6 +349,12 @@ bool ProfileManager::SaveLocalProfile( RString sProfileID )
void ProfileManager::UnloadProfile( PlayerNumber pn )
{
if( m_sProfileDir[pn].empty() )
{
// Don't bother unloading a profile that wasn't loaded in the first place.
// Saves us an expensive and pointless trip through all the songs.
return;
}
m_sProfileDir[pn] = "";
m_sProfileDirImportedFrom[pn] = "";
m_bWasLoadedFromMemoryCard[pn] = false;