Ensure the specified imSessionID exists in the DroppedSession collection before attempting to access it.

prioritization
Michael Cortez 2009-10-05 11:59:33 -07:00 committed by Melanie
parent 3d7e1eb7e5
commit 544675d0f0
1 changed files with 1 additions and 1 deletions

View File

@ -425,7 +425,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
foreach (GroupMembersData member in m_groupsModule.GroupMembersRequest(null, groupID))
{
if (m_agentsDroppedSession[im.imSessionID].Contains(member.AgentID.Guid))
if (!m_agentsDroppedSession.ContainsKey(im.imSessionID) || m_agentsDroppedSession[im.imSessionID].Contains(member.AgentID.Guid))
{
// Don't deliver messages to people who have dropped this session
if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING]: {0} has dropped session, not delivering to them", member.AgentID);