diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-02-22 14:15:58 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-02-22 14:15:58 -0500 |
commit | bd84d36c9d08878c895c896e097e8e3310b61cf3 (patch) | |
tree | e2e333ba15c131dfb25c4baf54bcb98fd2a3bd46 /indra/newview/llgroupmgr.cpp | |
parent | 00fdc0acd5e27d353c070706e838a35bf889a536 (diff) | |
parent | 04712617c55c53dbec1f73a4e8834ebe3167e5ed (diff) |
merge
Diffstat (limited to 'indra/newview/llgroupmgr.cpp')
-rw-r--r-- | indra/newview/llgroupmgr.cpp | 5 |
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; } } |