aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs13
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs13
2 files changed, 24 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 679b9b8..90cd3b1 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -3957,7 +3957,18 @@ namespace OpenSim.Region.ScriptEngine.Common
3957 UUID key = new UUID(); 3957 UUID key = new UUID();
3958 if (UUID.TryParse(id, out key)) 3958 if (UUID.TryParse(id, out key))
3959 { 3959 {
3960 return World.GetSceneObjectPart(World.Entities[key].LocalId).OwnerID.ToString(); 3960 try
3961 {
3962 SceneObjectPart obj = World.GetSceneObjectPart(World.Entities[key].LocalId);
3963 if (obj == null)
3964 return id; // the key is for an agent so just return the key
3965 else
3966 return obj.OwnerID.ToString();
3967 }
3968 catch (KeyNotFoundException)
3969 {
3970 return id; // The Object/Agent is not in the region so just return the key
3971 }
3961 } 3972 }
3962 else 3973 else
3963 { 3974 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index d2cfdca..110ece4 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3815,7 +3815,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3815 UUID key = new UUID(); 3815 UUID key = new UUID();
3816 if (UUID.TryParse(id, out key)) 3816 if (UUID.TryParse(id, out key))
3817 { 3817 {
3818 return World.GetSceneObjectPart(World.Entities[key].LocalId).OwnerID.ToString(); 3818 try
3819 {
3820 SceneObjectPart obj = World.GetSceneObjectPart(World.Entities[key].LocalId);
3821 if (obj == null)
3822 return id; // the key is for an agent so just return the key
3823 else
3824 return obj.OwnerID.ToString();
3825 }
3826 catch (KeyNotFoundException)
3827 {
3828 return id; // The Object/Agent not in the region so just return the key
3829 }
3819 } 3830 }
3820 else 3831 else
3821 { 3832 {