This commit is contained in:
auria.mg 2018-06-10 19:09:36 -04:00
parent e9becd283b
commit 81aedd6582

View File

@ -255,16 +255,18 @@ bool ProfileManager::inPersistent(const uint32_t id)
*/
OnlineProfile* ProfileManager::addPersistent(OnlineProfile * profile)
{
if (inPersistent(profile->getID()))
uint32_t profile_id = profile->getID();
if (inPersistent(profile_id))
{
m_profiles_persistent[profile->getID()]->merge(profile);
m_profiles_persistent[profile_id]->merge(profile);
}
else
{
m_profiles_persistent[profile->getID()] = profile;
m_profiles_persistent[profile_id] = profile;
}
return m_profiles_persistent[profile->getID()];
return m_profiles_persistent[profile_id];
} // addPersistent
// ------------------------------------------------------------------------