aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorUbitUmarov2014-10-22 10:21:54 +0100
committerUbitUmarov2014-10-22 10:21:54 +0100
commit382df37f807837d4fa9a38db4b47f5603325ed60 (patch)
tree0637352ea80d77ecfe1e51f937c9729a1be9d153 /OpenSim
parentrefuse crossings if logins disabled (diff)
downloadopensim-SC_OLD-382df37f807837d4fa9a38db4b47f5603325ed60.zip
opensim-SC_OLD-382df37f807837d4fa9a38db4b47f5603325ed60.tar.gz
opensim-SC_OLD-382df37f807837d4fa9a38db4b47f5603325ed60.tar.bz2
opensim-SC_OLD-382df37f807837d4fa9a38db4b47f5603325ed60.tar.xz
remove some Xengine errors on scripted object delete
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs22
1 files changed, 8 insertions, 14 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 452c443..1831c39 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -1478,18 +1478,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1478 // Do we even have it? 1478 // Do we even have it?
1479 if (!m_Scripts.ContainsKey(itemID)) 1479 if (!m_Scripts.ContainsKey(itemID))
1480 { 1480 {
1481 // Do we even have it?
1482 if (!m_Scripts.ContainsKey(itemID))
1483 return;
1484
1485 lockScriptsForRead(false); 1481 lockScriptsForRead(false);
1486 lockScriptsForWrite(true);
1487 m_Scripts.Remove(itemID);
1488 lockScriptsForWrite(false);
1489
1490 return; 1482 return;
1491 } 1483 }
1492
1493 1484
1494 IScriptInstance instance=m_Scripts[itemID]; 1485 IScriptInstance instance=m_Scripts[itemID];
1495 lockScriptsForRead(false); 1486 lockScriptsForRead(false);
@@ -1523,11 +1514,14 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1523 instance.RemoveState(); 1514 instance.RemoveState();
1524 instance.DestroyScriptInstance(); 1515 instance.DestroyScriptInstance();
1525 1516
1526 m_DomainScripts[instance.AppDomain].Remove(instance.ItemID); 1517 if (m_DomainScripts.ContainsKey(instance.AppDomain))
1527 if (m_DomainScripts[instance.AppDomain].Count == 0)
1528 { 1518 {
1529 m_DomainScripts.Remove(instance.AppDomain); 1519 m_DomainScripts[instance.AppDomain].Remove(instance.ItemID);
1530 UnloadAppDomain(instance.AppDomain); 1520 if (m_DomainScripts[instance.AppDomain].Count == 0)
1521 {
1522 m_DomainScripts.Remove(instance.AppDomain);
1523 UnloadAppDomain(instance.AppDomain);
1524 }
1531 } 1525 }
1532 1526
1533 ObjectRemoved handlerObjectRemoved = OnObjectRemoved; 1527 ObjectRemoved handlerObjectRemoved = OnObjectRemoved;