From 89c762209c9d8fb4cf74c0e89f33caf0f4962f44 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 10 May 2010 03:57:17 +0100 Subject: Fix a null ref on region crossing --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 79b6be3..7a9a92d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -5596,7 +5596,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetLandOwnerAt(LSL_Vector pos) { m_host.AddScriptLPS(1); - return World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).LandData.OwnerID.ToString(); + ILandObject land = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); + if (land == null) + return UUID.Zero.ToString(); + return land.LandData.OwnerID.ToString(); } /// -- cgit v1.1 From 31dc77d8a1452d7635a7ae167fb0066fcf99a115 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 10 May 2010 04:02:56 +0100 Subject: Return agents when angle is PI Fixes Mantis #4703 --- .../ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index 4d7ead6..5c2abd5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs @@ -472,6 +472,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins sensedEntities.Add(new SensedEntity(dis, presence.UUID)); } } + else + { + sensedEntities.Add(new SensedEntity(dis, presence.UUID)); + } } }); -- cgit v1.1