summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Kondrashev <ekondrashev@productengine.com>2009-10-27 18:30:09 +0200
committerEugene Kondrashev <ekondrashev@productengine.com>2009-10-27 18:30:09 +0200
commit606488d1df9f5eae093a1864d49f2eef3029b9dc (patch)
treeeeddf0550311f6ba487944eac6c1505021af541c
parent68ccc70e6579547d7b42134f79267a9fd40be35f (diff)
Refixed major bug ext1850-Crash after open of group-chat (ProductEngine). Added check if target speaker is not found.
--HG-- branch : product-engine
-rw-r--r--indra/newview/llparticipantlist.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index b10eb91b46..a8c66f08ac 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -99,8 +99,12 @@ bool LLParticipantList::SpeakerAddListener::handleEvent(LLPointer<LLOldEvents::L
bool LLParticipantList::SpeakerRemoveListener::handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata)
{
LLAvatarList::uuid_vector_t& group_members = mAvatarList->getIDs();
- group_members.erase(std::find(group_members.begin(), group_members.end(), event->getValue().asUUID()), group_members.end());
- mAvatarList->setDirty();
+ LLAvatarList::uuid_vector_t::iterator pos = std::find(group_members.begin(), group_members.end(), event->getValue().asUUID());
+ if(pos != group_members.end())
+ {
+ group_members.erase(pos);
+ mAvatarList->setDirty();
+ }
return true;
}