Fix #2270 (crash on startup).
This commit is contained in:
@@ -212,6 +212,10 @@ namespace Online
|
||||
setLastOnlineName(username);
|
||||
|
||||
OnlineProfile* profile = new OnlineProfile(userid, username, true);
|
||||
// Note that addPersistent might decide to merge profile with an
|
||||
// existing profile, and then delete profile. Only the returned
|
||||
// pointer is save to use.
|
||||
m_profile = ProfileManager::get()->addPersistent(profile);
|
||||
assert(token_fetched && username_fetched && userid_fetched);
|
||||
m_online_state = OS_SIGNED_IN;
|
||||
if(rememberPassword())
|
||||
@@ -219,7 +223,6 @@ namespace Online
|
||||
saveSession(getOnlineId(), getToken());
|
||||
}
|
||||
|
||||
m_profile = ProfileManager::get()->addPersistent(profile);
|
||||
std::string achieved_string("");
|
||||
|
||||
// Even if no achievements were sent, we have to call sync
|
||||
|
||||
Reference in New Issue
Block a user