From aa86730df288b77a6263ddb9f93b0aca79c055ef Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Fri, 11 Oct 2013 00:45:23 -0400 Subject: [PATCH] [LLIMMgr/LLIMPanel] Fix race condition between name lookup and title setting --- indra/newview/llimpanel.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 22d05991f..b65c62b00 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -342,8 +342,6 @@ LLFloaterIMPanel::LLFloaterIMPanel( mCallBackEnabled = LLVoiceClient::getInstance()->isSessionCallBackPossible(mSessionUUID); // fallthrough case IM_SESSION_P2P_INVITE: - if (LLVoiceClient::getInstance()->isParticipantAvatar(mSessionUUID)) - LLAvatarNameCache::get(mOtherParticipantUUID, boost::bind(&LLFloaterIMPanel::onAvatarNameLookup, this, _2)); mVoiceChannel = new LLVoiceChannelP2P(mSessionUUID, mLogLabel, mOtherParticipantUUID); LLAvatarTracker::instance().addParticularFriendObserver(mOtherParticipantUUID, this); break; @@ -359,8 +357,6 @@ LLFloaterIMPanel::LLFloaterIMPanel( &getFactoryMap(), FALSE); - setTitle(mLogLabel); - // enable line history support for instant message bar mInputEditor->setEnableLineHistory(TRUE); @@ -461,6 +457,10 @@ BOOL LLFloaterIMPanel::postBuild() if (checkRequirements()) { + setTitle(mLogLabel); + if (mSessionType == P2P_SESSION && LLVoiceClient::getInstance()->isParticipantAvatar(mSessionUUID)) + LLAvatarNameCache::get(mOtherParticipantUUID, boost::bind(&LLFloaterIMPanel::onAvatarNameLookup, this, _2)); + mInputEditor = getChild("chat_editor"); mInputEditor->setFocusReceivedCallback( boost::bind(&LLFloaterIMPanel::onInputEditorFocusReceived, this) ); mFocusLostSignal = mInputEditor->setFocusLostCallback(boost::bind(&LLFloaterIMPanel::setTyping, this, false));