diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llparticipantlist.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llparticipantlist.h | 6 |
2 files changed, 10 insertions, 9 deletions
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 9450bee315..edff706fee 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -45,14 +45,15 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list): mSpeakerMgr(data_source), mAvatarList(avatar_list), - mSpeakerAddListener(*this), - mSpeakerRemoveListener(*this), - mSpeakerClearListener(*this), mSortOrder(E_SORT_BY_NAME) { - mSpeakerMgr->addListener(&mSpeakerAddListener, "add"); - mSpeakerMgr->addListener(&mSpeakerRemoveListener, "remove"); - mSpeakerMgr->addListener(&mSpeakerClearListener, "clear"); + mSpeakerAddListener = new SpeakerAddListener(*this); + mSpeakerRemoveListener = new SpeakerRemoveListener(*this); + mSpeakerClearListener = new SpeakerClearListener(*this); + + mSpeakerMgr->addListener(mSpeakerAddListener, "add"); + mSpeakerMgr->addListener(mSpeakerRemoveListener, "remove"); + mSpeakerMgr->addListener(mSpeakerClearListener, "clear"); mAvatarList->setNoItemsCommentText(LLTrans::getString("LoadingData")); mAvatarList->setDoubleClickCallback(boost::bind(&LLParticipantList::onAvatarListDoubleClicked, this, mAvatarList)); diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index 04d9e29256..8c209c0b20 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -103,9 +103,9 @@ class LLParticipantList LLSpeakerMgr* mSpeakerMgr; LLAvatarList* mAvatarList; - SpeakerAddListener mSpeakerAddListener; - SpeakerRemoveListener mSpeakerRemoveListener; - SpeakerClearListener mSpeakerClearListener; + LLPointer<SpeakerAddListener> mSpeakerAddListener; + LLPointer<SpeakerRemoveListener> mSpeakerRemoveListener; + LLPointer<SpeakerClearListener> mSpeakerClearListener; EParticipantSortOrder mSortOrder; }; |