aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs5
1 files changed, 4 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 f748522..52e7288 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3028,7 +3028,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3028 ShoutError("Script trying to link but PERMISSION_CHANGE_LINKS permission not set!"); 3028 ShoutError("Script trying to link but PERMISSION_CHANGE_LINKS permission not set!");
3029 return; 3029 return;
3030 } 3030 }
3031 IClientAPI client = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter).ControllingClient; 3031 IClientAPI client = null;
3032 ScenePresence sp = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter);
3033 if (sp!=null)
3034 client = sp.ControllingClient;
3032 SceneObjectPart targetPart = World.GetSceneObjectPart((UUID)target); 3035 SceneObjectPart targetPart = World.GetSceneObjectPart((UUID)target);
3033 if (targetPart.ParentGroup.RootPart.AttachmentPoint != 0) 3036 if (targetPart.ParentGroup.RootPart.AttachmentPoint != 0)
3034 return; // Fail silently if attached 3037 return; // Fail silently if attached