From b0fe0464af9a11dda184d3613eca734cd8c9f21e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 22 Nov 2011 22:13:57 +0000 Subject: Stop an exception being thrown and a teleport/border cross failing if the desintation sim has no active script engines. This involves getting IScene.RequestModuleInterfaces() to return an empty array (as was stated in the method doc) rather than an array containing one null entry. Callers adjusted to stop checking for the list reference being null (which never happened anyway) --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 663aa22..26eb729 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -82,16 +82,9 @@ namespace OpenSim.Region.Framework.Scenes m_log.Info("[PRIM INVENTORY]: Starting scripts in scene"); IScriptModule[] engines = RequestModuleInterfaces(); - if (engines != null) - { - foreach (IScriptModule engine in engines) - { - if (engine != null) - { - engine.StartProcessing(); - } - } - } + + foreach (IScriptModule engine in engines) + engine.StartProcessing(); } public void AddUploadedInventoryItem(UUID agentID, InventoryItemBase item) -- cgit v1.1