aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneGraph.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-02-08 21:58:59 +0000
committerJustin Clark-Casey (justincc)2012-02-08 22:19:34 +0000
commitdfa19e23f03643762a10677203c088161a99557e (patch)
treeced1397f035e87f3b922a41892d41c7f30595e84 /OpenSim/Region/Framework/Scenes/SceneGraph.cs
parentMake WebStats logging report consistently as WEB STATS MODULE instead of VC, ... (diff)
downloadopensim-SC_OLD-dfa19e23f03643762a10677203c088161a99557e.zip
opensim-SC_OLD-dfa19e23f03643762a10677203c088161a99557e.tar.gz
opensim-SC_OLD-dfa19e23f03643762a10677203c088161a99557e.tar.bz2
opensim-SC_OLD-dfa19e23f03643762a10677203c088161a99557e.tar.xz
Stop a scene object from attempting to link with itself (which results in an exception and constant complaints in v3 viewers).
Aims to address http://opensimulator.org/mantis/view.php?id=5878
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs16
1 files changed, 11 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 7d801b5..693a79e 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -1662,6 +1662,10 @@ namespace OpenSim.Region.Framework.Scenes
1662 { 1662 {
1663 SceneObjectGroup child = children[i].ParentGroup; 1663 SceneObjectGroup child = children[i].ParentGroup;
1664 1664
1665 // Don't try and add a group to itself - this will only cause severe problems later on.
1666 if (child == parentGroup)
1667 continue;
1668
1665 // Make sure no child prim is set for sale 1669 // Make sure no child prim is set for sale
1666 // So that, on delink, no prims are unwittingly 1670 // So that, on delink, no prims are unwittingly
1667 // left for sale and sold off 1671 // left for sale and sold off
@@ -1684,11 +1688,13 @@ namespace OpenSim.Region.Framework.Scenes
1684 1688
1685 // We need to explicitly resend the newly link prim's object properties since no other actions 1689 // We need to explicitly resend the newly link prim's object properties since no other actions
1686 // occur on link to invoke this elsewhere (such as object selection) 1690 // occur on link to invoke this elsewhere (such as object selection)
1687 parentGroup.RootPart.CreateSelected = true; 1691 if (childGroups.Count > 0)
1688 parentGroup.TriggerScriptChangedEvent(Changed.LINK); 1692 {
1689 parentGroup.HasGroupChanged = true; 1693 parentGroup.RootPart.CreateSelected = true;
1690 parentGroup.ScheduleGroupForFullUpdate(); 1694 parentGroup.TriggerScriptChangedEvent(Changed.LINK);
1691 1695 parentGroup.HasGroupChanged = true;
1696 parentGroup.ScheduleGroupForFullUpdate();
1697 }
1692 } 1698 }
1693 finally 1699 finally
1694 { 1700 {