From 216d9e5d37362995ee2be158de493d06b294c016 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Fri, 19 Feb 2010 22:29:55 +0200 Subject: No ticket. Minor style changes in code introduced in changeset 43f903cf4d89. --HG-- branch : product-engine --- indra/newview/llgroupmgr.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra') 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; } } -- cgit v1.2.3