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.0.6.1-post-fixes
parent
0d5d3e0b48
commit
59b0ac846c
|
@ -3028,7 +3028,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
ShoutError("Script trying to link but PERMISSION_CHANGE_LINKS permission not set!");
|
||||
return;
|
||||
}
|
||||
IClientAPI client = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter).ControllingClient;
|
||||
IClientAPI client = null;
|
||||
ScenePresence sp = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter);
|
||||
if (sp!=null)
|
||||
client = sp.ControllingClient;
|
||||
SceneObjectPart targetPart = World.GetSceneObjectPart((UUID)target);
|
||||
if (targetPart.ParentGroup.RootPart.AttachmentPoint != 0)
|
||||
return; // Fail silently if attached
|
||||
|
|
Loading…
Reference in New Issue