From fb3df4790e27345a1e45f4a4675e756c1e551f21 Mon Sep 17 00:00:00 2001 From: William Todd Stinson Date: Tue, 30 Oct 2012 15:59:42 -0700 Subject: 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. --- indra/newview/llimfloatercontainer.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'indra/newview/llimfloatercontainer.cpp') 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(*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++; } -- cgit v1.2.3