diff options
author | Merov Linden <merov@lindenlab.com> | 2012-12-17 18:59:01 -0800 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2012-12-17 18:59:01 -0800 |
commit | 6fe7144104cd8b5bd9c7d215f76afdeafe13b7ee (patch) | |
tree | c4f7f5d9b0f03c5beae32ca0f234d1fd4f4d326b /indra/newview/llconversationlog.cpp | |
parent | 0e4c3070cb6cfb389d708ca459ed2c721c1cc28a (diff) |
CHUI-580 : WIP : Protect callback connections passed to LLAvatarNameCache::get() where necessary
Diffstat (limited to 'indra/newview/llconversationlog.cpp')
-rw-r--r-- | indra/newview/llconversationlog.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp index a0765f5e16..f8ccb08e66 100644 --- a/indra/newview/llconversationlog.cpp +++ b/indra/newview/llconversationlog.cpp @@ -185,7 +185,8 @@ void LLConversationLogFriendObserver::changed(U32 mask) /* LLConversationLog implementation */ /************************************************************************/ -LLConversationLog::LLConversationLog() +LLConversationLog::LLConversationLog() : + mAvatarNameCacheConnection() { LLControlVariable* ctrl = gSavedPerAccountSettings.getControl("LogInstantMessages").get(); if (ctrl) @@ -251,7 +252,11 @@ void LLConversationLog::createConversation(const LLIMModel::LLIMSession* session if (LLIMModel::LLIMSession::P2P_SESSION == session->mSessionType) { - LLAvatarNameCache::get(session->mOtherParticipantID, boost::bind(&LLConversationLog::onAvatarNameCache, this, _1, _2, session)); + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + mAvatarNameCacheConnection = LLAvatarNameCache::get(session->mOtherParticipantID, boost::bind(&LLConversationLog::onAvatarNameCache, this, _1, _2, session)); } notifyObservers(); |