aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs20
1 files changed, 19 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 6ebfd31..9117224 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -1967,8 +1967,17 @@ namespace OpenSim.Region.Framework.Scenes
1967 List<SceneObjectPart> children = new List<SceneObjectPart>(); 1967 List<SceneObjectPart> children = new List<SceneObjectPart>();
1968 SceneObjectPart root = GetSceneObjectPart(parentPrimId); 1968 SceneObjectPart root = GetSceneObjectPart(parentPrimId);
1969 1969
1970 if (Permissions.CanLinkObject(client.AgentId, root.ParentGroup.RootPart.UUID)) 1970 if (root == null)
1971 {
1972 m_log.DebugFormat("[LINK]: Can't find linkset root prim {0{", parentPrimId);
1973 return;
1974 }
1975
1976 if (!Permissions.CanLinkObject(client.AgentId, root.ParentGroup.RootPart.UUID))
1977 {
1978 m_log.DebugFormat("[LINK]: Refusing link. No permissions on root prim");
1971 return; 1979 return;
1980 }
1972 1981
1973 foreach (uint localID in childPrimIds) 1982 foreach (uint localID in childPrimIds)
1974 { 1983 {
@@ -1987,7 +1996,16 @@ namespace OpenSim.Region.Framework.Scenes
1987 // Must be all one owner 1996 // Must be all one owner
1988 // 1997 //
1989 if (owners.Count > 1) 1998 if (owners.Count > 1)
1999 {
2000 m_log.DebugFormat("[LINK]: Refusing link. Too many owners");
2001 return;
2002 }
2003
2004 if (children.Count == 0)
2005 {
2006 m_log.DebugFormat("[LINK]: Refusing link. No permissions to link any of the children");
1990 return; 2007 return;
2008 }
1991 2009
1992 m_sceneGraph.LinkObjects(root, children); 2010 m_sceneGraph.LinkObjects(root, children);
1993 } 2011 }