Prevent a dump in the llGetLinkKey method when using LINK_ROOT in a single prim

avinationmerge
Melanie 2010-11-23 23:48:52 +01:00
parent 6557d5f359
commit a47fb93b74
1 changed files with 3 additions and 0 deletions

View File

@ -4007,6 +4007,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
linknum -= (m_host.ParentGroup.PrimCount) + 1; linknum -= (m_host.ParentGroup.PrimCount) + 1;
if (linknum < 0)
return UUID.Zero.ToString();
List<ScenePresence> avatars = GetLinkAvatars(ScriptBaseClass.LINK_SET); List<ScenePresence> avatars = GetLinkAvatars(ScriptBaseClass.LINK_SET);
if (avatars.Count > linknum) if (avatars.Count > linknum)
{ {