Skip to content
Snippets Groups Projects
Commit 09796dd0 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Fix weird name cache connection crash

parent ae4e5cdf
No related branches found
No related tags found
2 merge requests!3Update to main branch,!2Rebase onto current main branch
......@@ -262,6 +262,10 @@ LLPanelGroupBulk::LLPanelGroupBulk(const LLUUID& group_id) :
LLPanelGroupBulk::~LLPanelGroupBulk()
{
if (mAvatarNameCacheConnection.connected())
{
mAvatarNameCacheConnection.disconnect();
}
delete mImplementation;
}
......@@ -350,6 +354,11 @@ void LLPanelGroupBulk::updateGroupData()
void LLPanelGroupBulk::addUserCallback(const LLUUID& id, const LLAvatarName& av_name)
{
if (mAvatarNameCacheConnection.connected())
{
mAvatarNameCacheConnection.disconnect();
}
std::vector<std::string> names;
uuid_vec_t agent_ids;
agent_ids.push_back(id);
......@@ -403,7 +412,7 @@ void LLPanelGroupBulk::addUsers(uuid_vec_t& agent_ids)
if (!LLAvatarNameCache::get(agent_id, &av_name))
{
// actually it should happen, just in case
LLAvatarNameCache::get(LLUUID(agent_id), boost::bind(&LLPanelGroupBulk::addUserCallback, this, _1, _2));
mAvatarNameCacheConnection = LLAvatarNameCache::get(LLUUID(agent_id), boost::bind(&LLPanelGroupBulk::addUserCallback, this, _1, _2));
// for this special case!
//when there is no cached name we should remove resident from agent_ids list to avoid breaking of sequence
// removed id will be added in callback
......
......@@ -68,6 +68,7 @@ class LLPanelGroupBulk : public LLPanel
bool mPendingGroupPropertiesUpdate;
bool mPendingRoleDataUpdate;
bool mPendingMemberDataUpdate;
boost::signals2::connection mAvatarNameCacheConnection;
};
#endif // LL_LLPANELGROUPBULK_H
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment