diff options
author | Justin Clarke Casey | 2008-09-22 20:09:06 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-09-22 20:09:06 +0000 |
commit | 8e00e933a47c583e1016dd164e50c49d4db57167 (patch) | |
tree | a79ab7d21ee36fe4424aecf5de8e2eab90a45ad6 /OpenSim/Region/ScriptEngine/Common | |
parent | Remove the ugly-as-sin "interop" hack script perms fudging in (diff) | |
download | opensim-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/Common')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 13 |
1 files changed, 12 insertions, 1 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 | { |