summaryrefslogtreecommitdiff
path: root/indra/newview/llimfloatercontainer.cpp
diff options
context:
space:
mode:
authorWilliam Todd Stinson <stinson@lindenlab.com>2012-10-30 15:59:42 -0700
committerWilliam Todd Stinson <stinson@lindenlab.com>2012-10-30 15:59:42 -0700
commitfb3df4790e27345a1e45f4a4675e756c1e551f21 (patch)
treed6e4d6e082edc1b71275687b1eb5106c5d8cd4d9 /indra/newview/llimfloatercontainer.cpp
parent1160d82fb8566d7c76f0c39785c97fcf31768f0c (diff)
CHUI-459: Creating a fetchAvatarName() method for the LLConversationItemParticipant class to allow the class to query for the avatar display name directly. Also, added a field to store the avatar name cache callback connection so that we can disconnect properly on object destruction to avoid a crash with the callback attempting to access recently freed memory.
Diffstat (limited to 'indra/newview/llimfloatercontainer.cpp')
-rw-r--r--indra/newview/llimfloatercontainer.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index f46ecd905a..00ae0b8fd8 100644
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -358,16 +358,7 @@ void LLIMFloaterContainer::processParticipantsStyleUpdate()
{
LLConversationItemParticipant* participant_model = dynamic_cast<LLConversationItemParticipant*>(*current_participant_model);
// Get the avatar name for this participant id from the cache and update the model
- LLUUID participant_id = participant_model->getUUID();
- LLAvatarName av_name;
- LLAvatarNameCache::get(participant_id,&av_name);
- // Avoid updating the model though if the cache is still waiting for its first update
- if (!av_name.mDisplayName.empty())
- {
- participant_model->onAvatarNameCache(av_name);
- }
- // Bind update to the next cache name signal
- LLAvatarNameCache::get(participant_id, boost::bind(&LLConversationItemParticipant::onAvatarNameCache, participant_model, _2));
+ participant_model->fetchAvatarName();
// Next participant
current_participant_model++;
}