From 9c5646a1ba92a2a2cd1ab546a622bf2186eb8219 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 16 Nov 2015 23:21:58 +0000 Subject: [PATCH] work around some 'tests' errors: dont use references to objects that may have been deleted --- .../ScriptEngine/XEngine/Tests/XEngineCrossingTests.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineCrossingTests.cs b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineCrossingTests.cs index 587695fc1a..2bf8d22ae3 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineCrossingTests.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineCrossingTests.cs @@ -111,10 +111,13 @@ namespace OpenSim.Region.ScriptEngine.XEngine.Tests SceneObjectGroup soSceneA = SceneHelpers.AddSceneObject(sceneA, 1, userId, "so1-", sceneObjectIdTail); soSceneA.AbsolutePosition = new Vector3(128, 10, 20); + string soSceneAName = soSceneA.Name; + string scriptItemSceneAName = "script1"; + // CREATE SCRIPT TODO InventoryItemBase scriptItemSceneA = new InventoryItemBase(); // itemTemplate.ID = itemId; - scriptItemSceneA.Name = "script1"; + scriptItemSceneA.Name = scriptItemSceneAName; scriptItemSceneA.Folder = soSceneA.UUID; scriptItemSceneA.InvType = (int)InventoryType.LSL; @@ -174,8 +177,8 @@ default // TEST sending event to moved prim and output { - SceneObjectGroup soSceneB = sceneB.GetSceneObjectGroup(soSceneA.Name); - TaskInventoryItem scriptItemSceneB = soSceneB.RootPart.Inventory.GetInventoryItem(scriptItemSceneA.Name); + SceneObjectGroup soSceneB = sceneB.GetSceneObjectGroup(soSceneAName); + TaskInventoryItem scriptItemSceneB = soSceneB.RootPart.Inventory.GetInventoryItem(scriptItemSceneAName); // XXX: Should not be doing this so directly. Should call some variant of EventManager.touch() instead. DetectParams[] det = new DetectParams[1];