Put guards on a bunch of exception-inducing code, as seen in logs from load test.

This commit is contained in:
Diva Canto
2013-07-09 14:12:52 -07:00
parent b2d4b8b1da
commit 67e500383e
6 changed files with 20 additions and 6 deletions

View File

@@ -553,7 +553,8 @@ namespace OpenSim.Region.Framework.Scenes
/// </param>
public void StopScriptInstance(TaskInventoryItem item)
{
m_part.ParentGroup.Scene.EventManager.TriggerStopScript(m_part.LocalId, item.ItemID);
if (m_part.ParentGroup.Scene != null)
m_part.ParentGroup.Scene.EventManager.TriggerStopScript(m_part.LocalId, item.ItemID);
// At the moment, even stopped scripts are counted as active, which is probably wrong.
// m_part.ParentGroup.AddActiveScriptCount(-1);