aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-09-22 20:09:06 +0000
committerJustin Clarke Casey2008-09-22 20:09:06 +0000
commit8e00e933a47c583e1016dd164e50c49d4db57167 (patch)
treea79ab7d21ee36fe4424aecf5de8e2eab90a45ad6 /OpenSim/Region/ScriptEngine/Shared/Api
parentRemove the ugly-as-sin "interop" hack script perms fudging in (diff)
downloadopensim-SC-8e00e933a47c583e1016dd164e50c49d4db57167.zip
opensim-SC-8e00e933a47c583e1016dd164e50c49d4db57167.tar.gz
opensim-SC-8e00e933a47c583e1016dd164e50c49d4db57167.tar.bz2
opensim-SC-8e00e933a47c583e1016dd164e50c49d4db57167.tar.xz
* Apply http://opensimulator.org/mantis/view.php?id=2234
* Exceptions can thrown by llGetOwnerKey() * Thanks idb
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs13
1 files changed, 12 insertions, 1 deletions
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 {