diff --git a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs index 090f1d54d8..08e08c8ebe 100644 --- a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs @@ -575,13 +575,16 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm { List data = new List(); - foreach (List list in m_listeners.Values) + lock (m_listeners) { - foreach (ListenerInfo l in list) - { - if (l.GetItemID() == itemID) - data.AddRange(l.GetSerializationData()); - } + foreach (List list in m_listeners.Values) + { + foreach (ListenerInfo l in list) + { + if (l.GetItemID() == itemID) + data.AddRange(l.GetSerializationData()); + } + } } return (Object[])data.ToArray(); }