Bugfix: addPersistent/addToCache would call Profile::merge(), which

deletes the original profile --> the profile accessed after this call
was invalid.
This commit is contained in:
hiker
2014-02-28 08:51:02 +11:00
parent 76787599d9
commit bef02c116c

View File

@@ -224,14 +224,15 @@ void Profile::storeFriends(const XMLNode * input)
if (m_is_current_user)
{
profile = new Profile(friends_xml->getNode(i), C_RELATION_INFO);
m_friends.push_back(profile->getID());
ProfileManager::get()->addPersistent(profile);
}
else
{
profile = new Profile(friends_xml->getNode(i)->getNode("user"), C_DEFAULT);
m_friends.push_back(profile->getID());
ProfileManager::get()->addToCache(profile);
}
m_friends.push_back(profile->getID());
} // for i in nodes
m_has_fetched_friends = true;
m_state = S_READY;