diff options
author | Diva Canto | 2013-07-09 14:12:52 -0700 |
---|---|---|
committer | Diva Canto | 2013-07-09 14:12:52 -0700 |
commit | 67e500383eb024fe4dd2681d0c5d902f289b65d8 (patch) | |
tree | f3523d8849fd573208869bf8e0aa8a77eb2c2077 /OpenSim/Region/Framework | |
parent | BaseHttpServer: if the handler sets the content length, don't override it. Th... (diff) | |
download | opensim-SC-67e500383eb024fe4dd2681d0c5d902f289b65d8.zip opensim-SC-67e500383eb024fe4dd2681d0c5d902f289b65d8.tar.gz opensim-SC-67e500383eb024fe4dd2681d0c5d902f289b65d8.tar.bz2 opensim-SC-67e500383eb024fe4dd2681d0c5d902f289b65d8.tar.xz |
Put guards on a bunch of exception-inducing code, as seen in logs from load test.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 3 |
3 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 355e0ee..54956ee 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3687,7 +3687,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3687 | "[SCENE]: Existing root scene presence detected for {0} {1} in {2} when connecting. Removing existing presence.", | 3687 | "[SCENE]: Existing root scene presence detected for {0} {1} in {2} when connecting. Removing existing presence.", |
3688 | sp.Name, sp.UUID, RegionInfo.RegionName); | 3688 | sp.Name, sp.UUID, RegionInfo.RegionName); |
3689 | 3689 | ||
3690 | sp.ControllingClient.Close(true); | 3690 | if (sp.ControllingClient != null) |
3691 | sp.ControllingClient.Close(true); | ||
3692 | |||
3691 | sp = null; | 3693 | sp = null; |
3692 | } | 3694 | } |
3693 | 3695 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs index dcb62f8..527ca35 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -67,6 +67,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
67 | { | 67 | { |
68 | int scriptsStarted = 0; | 68 | int scriptsStarted = 0; |
69 | 69 | ||
70 | if (m_scene == null) | ||
71 | { | ||
72 | m_log.DebugFormat("[PRIM INVENTORY]: m_scene is null. Unable to create script instances"); | ||
73 | return 0; | ||
74 | } | ||
75 | |||
70 | // Don't start scripts if they're turned off in the region! | 76 | // Don't start scripts if they're turned off in the region! |
71 | if (!m_scene.RegionInfo.RegionSettings.DisableScripts) | 77 | if (!m_scene.RegionInfo.RegionSettings.DisableScripts) |
72 | { | 78 | { |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 7dba7c8..3f223a3 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -553,7 +553,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
553 | /// </param> | 553 | /// </param> |
554 | public void StopScriptInstance(TaskInventoryItem item) | 554 | public void StopScriptInstance(TaskInventoryItem item) |
555 | { | 555 | { |
556 | m_part.ParentGroup.Scene.EventManager.TriggerStopScript(m_part.LocalId, item.ItemID); | 556 | if (m_part.ParentGroup.Scene != null) |
557 | m_part.ParentGroup.Scene.EventManager.TriggerStopScript(m_part.LocalId, item.ItemID); | ||
557 | 558 | ||
558 | // At the moment, even stopped scripts are counted as active, which is probably wrong. | 559 | // At the moment, even stopped scripts are counted as active, which is probably wrong. |
559 | // m_part.ParentGroup.AddActiveScriptCount(-1); | 560 | // m_part.ParentGroup.AddActiveScriptCount(-1); |