remove some Xengine errors on scripted object delete
parent
31c036c044
commit
382df37f80
|
@ -1478,19 +1478,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
|||
// Do we even have it?
|
||||
if (!m_Scripts.ContainsKey(itemID))
|
||||
{
|
||||
// Do we even have it?
|
||||
if (!m_Scripts.ContainsKey(itemID))
|
||||
return;
|
||||
|
||||
lockScriptsForRead(false);
|
||||
lockScriptsForWrite(true);
|
||||
m_Scripts.Remove(itemID);
|
||||
lockScriptsForWrite(false);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
IScriptInstance instance=m_Scripts[itemID];
|
||||
lockScriptsForRead(false);
|
||||
lockScriptsForWrite(true);
|
||||
|
@ -1523,12 +1514,15 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
|||
instance.RemoveState();
|
||||
instance.DestroyScriptInstance();
|
||||
|
||||
if (m_DomainScripts.ContainsKey(instance.AppDomain))
|
||||
{
|
||||
m_DomainScripts[instance.AppDomain].Remove(instance.ItemID);
|
||||
if (m_DomainScripts[instance.AppDomain].Count == 0)
|
||||
{
|
||||
m_DomainScripts.Remove(instance.AppDomain);
|
||||
UnloadAppDomain(instance.AppDomain);
|
||||
}
|
||||
}
|
||||
|
||||
ObjectRemoved handlerObjectRemoved = OnObjectRemoved;
|
||||
if (handlerObjectRemoved != null)
|
||||
|
|
Loading…
Reference in New Issue