summaryrefslogtreecommitdiff
path: root/indra/newview/llgroupmgr.cpp
diff options
context:
space:
mode:
authorAndrew Dyukov <adyukov@productengine.com>2010-02-19 22:29:55 +0200
committerAndrew Dyukov <adyukov@productengine.com>2010-02-19 22:29:55 +0200
commit216d9e5d37362995ee2be158de493d06b294c016 (patch)
tree40013f5887ca3d729c5ea31f1ce5b34eba518d88 /indra/newview/llgroupmgr.cpp
parentcb95fc1f4892c492ce2db9521d57f960c70c4762 (diff)
No ticket. Minor style changes in code introduced in changeset 43f903cf4d89.
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llgroupmgr.cpp')
-rw-r--r--indra/newview/llgroupmgr.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index 6dbd3a81e8..6e7321f739 100644
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -1728,7 +1728,6 @@ void LLGroupMgr::sendGroupMemberEjects(const LLUUID& group_id,
LLGroupMgrGroupData::member_list_t::iterator mit = group_datap->mMembers.find(ejected_member_id);
if (mit != group_datap->mMembers.end())
{
- LLGroupMemberData* member_data = (*mit).second;
// Add them to the message
if (start_message)
{
@@ -1750,6 +1749,8 @@ void LLGroupMgr::sendGroupMemberEjects(const LLUUID& group_id,
start_message = true;
}
+ LLGroupMemberData* member_data = (*mit).second;
+
// Clean up groupmgr
for (LLGroupMemberData::role_list_t::iterator rit = member_data->roleBegin();
rit != member_data->roleEnd(); ++rit)
@@ -1762,6 +1763,8 @@ void LLGroupMgr::sendGroupMemberEjects(const LLUUID& group_id,
group_datap->mMembers.erase(ejected_member_id);
+ // member_data was introduced and is used here instead of (*mit).second to avoid crash because of invalid iterator
+ // It becomes invalid after line with erase above. EXT-4778
delete member_data;
}
}