Avoid race condition between m_PrimObjects iteration in XEngine.PostObjectEvent and places where the list is modified by extending the m_PrimObjects lock.
parent
9f3feeff8d
commit
80a41e670d
|
@ -1363,22 +1363,22 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
uuids = m_PrimObjects[localID];
|
uuids = m_PrimObjects[localID];
|
||||||
}
|
|
||||||
|
|
||||||
foreach (UUID itemID in uuids)
|
foreach (UUID itemID in uuids)
|
||||||
{
|
|
||||||
IScriptInstance instance = null;
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
if (m_Scripts.ContainsKey(itemID))
|
IScriptInstance instance = null;
|
||||||
instance = m_Scripts[itemID];
|
try
|
||||||
}
|
{
|
||||||
catch { /* ignore race conditions */ }
|
if (m_Scripts.ContainsKey(itemID))
|
||||||
|
instance = m_Scripts[itemID];
|
||||||
if (instance != null)
|
}
|
||||||
{
|
catch { /* ignore race conditions */ }
|
||||||
instance.PostEvent(p);
|
|
||||||
result = true;
|
if (instance != null)
|
||||||
|
{
|
||||||
|
instance.PostEvent(p);
|
||||||
|
result = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue