diff options
author | Dr Scofield | 2008-12-03 10:10:01 +0000 |
---|---|---|
committer | Dr Scofield | 2008-12-03 10:10:01 +0000 |
commit | 59b0ac846c52dc8fb56f37a1d0ab18a7f27ba6aa (patch) | |
tree | f3c70e53420fa43cdc242a91127e0d5beadbe9b7 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation | |
parent | Reinstate closing the EQ when the UDP circuit disconnects. This will likely (diff) | |
download | opensim-SC_OLD-59b0ac846c52dc8fb56f37a1d0ab18a7f27ba6aa.zip opensim-SC_OLD-59b0ac846c52dc8fb56f37a1d0ab18a7f27ba6aa.tar.gz opensim-SC_OLD-59b0ac846c52dc8fb56f37a1d0ab18a7f27ba6aa.tar.bz2 opensim-SC_OLD-59b0ac846c52dc8fb56f37a1d0ab18a7f27ba6aa.tar.xz |
From: Christopher Yeoh <cyeoh@au1.ibm.com>
The attached patch fixes the bug where llCreateLink will cause a null dereference
if the avatar who gave link permission for the object is no longer logged in.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 5 |
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 |