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?
|
// Do we even have it?
|
||||||
if (!m_Scripts.ContainsKey(itemID))
|
if (!m_Scripts.ContainsKey(itemID))
|
||||||
{
|
{
|
||||||
// Do we even have it?
|
|
||||||
if (!m_Scripts.ContainsKey(itemID))
|
|
||||||
return;
|
|
||||||
|
|
||||||
lockScriptsForRead(false);
|
lockScriptsForRead(false);
|
||||||
lockScriptsForWrite(true);
|
|
||||||
m_Scripts.Remove(itemID);
|
|
||||||
lockScriptsForWrite(false);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
IScriptInstance instance=m_Scripts[itemID];
|
IScriptInstance instance=m_Scripts[itemID];
|
||||||
lockScriptsForRead(false);
|
lockScriptsForRead(false);
|
||||||
lockScriptsForWrite(true);
|
lockScriptsForWrite(true);
|
||||||
|
@ -1523,12 +1514,15 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
instance.RemoveState();
|
instance.RemoveState();
|
||||||
instance.DestroyScriptInstance();
|
instance.DestroyScriptInstance();
|
||||||
|
|
||||||
|
if (m_DomainScripts.ContainsKey(instance.AppDomain))
|
||||||
|
{
|
||||||
m_DomainScripts[instance.AppDomain].Remove(instance.ItemID);
|
m_DomainScripts[instance.AppDomain].Remove(instance.ItemID);
|
||||||
if (m_DomainScripts[instance.AppDomain].Count == 0)
|
if (m_DomainScripts[instance.AppDomain].Count == 0)
|
||||||
{
|
{
|
||||||
m_DomainScripts.Remove(instance.AppDomain);
|
m_DomainScripts.Remove(instance.AppDomain);
|
||||||
UnloadAppDomain(instance.AppDomain);
|
UnloadAppDomain(instance.AppDomain);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ObjectRemoved handlerObjectRemoved = OnObjectRemoved;
|
ObjectRemoved handlerObjectRemoved = OnObjectRemoved;
|
||||||
if (handlerObjectRemoved != null)
|
if (handlerObjectRemoved != null)
|
||||||
|
|
Loading…
Reference in New Issue