From a47fb93b7419c08549b27dc0d5c27896ecf744c7 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 23 Nov 2010 23:48:52 +0100 Subject: Prevent a dump in the llGetLinkKey method when using LINK_ROOT in a single prim --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 7e9224d..ec4d815 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -4007,6 +4007,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { linknum -= (m_host.ParentGroup.PrimCount) + 1; + if (linknum < 0) + return UUID.Zero.ToString(); + List avatars = GetLinkAvatars(ScriptBaseClass.LINK_SET); if (avatars.Count > linknum) { -- cgit v1.1