aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-11-17 15:40:27 +0000
committerJustin Clarke Casey2008-11-17 15:40:27 +0000
commitd54b6608a7acfa7fc9fd074f2fbd241519067fcb (patch)
tree4fb604c6b80f0e67d9ea8e884941386a9a4d6a4f /OpenSim/Region/Environment/Scenes/Scene.cs
parentfixing warnings in YProlog language support (diff)
downloadopensim-SC-d54b6608a7acfa7fc9fd074f2fbd241519067fcb.zip
opensim-SC-d54b6608a7acfa7fc9fd074f2fbd241519067fcb.tar.gz
opensim-SC-d54b6608a7acfa7fc9fd074f2fbd241519067fcb.tar.bz2
opensim-SC-d54b6608a7acfa7fc9fd074f2fbd241519067fcb.tar.xz
* Stop nulling SOG.m_rootPart and parts on object deletion
* This renders RootPart == null checks useless - the replacement is to check SOG.IsDeleted. However, in many cases this will not be necessary since updates to deleted parts will not be sent to the client * This should remove any remaining race conditions where an object is deleted while another thread is yet to obtain the root part to perform some operation * Doing this is probably a necessary prerequisite to moving to a model without a separate SOG and SOP * Unfortunately it's not possible to eliminate all RootPart == null checks since in some contexts it is currently used to check whether an object was created successfully
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index c055160..cf743de 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -2015,7 +2015,7 @@ namespace OpenSim.Region.Environment.Scenes
2015 { 2015 {
2016 if (grp == null) 2016 if (grp == null)
2017 return; 2017 return;
2018 if (grp.RootPart == null) 2018 if (grp.IsDeleted)
2019 return; 2019 return;
2020 2020
2021 if (grp.RootPart.DIE_AT_EDGE) 2021 if (grp.RootPart.DIE_AT_EDGE)
@@ -2116,7 +2116,7 @@ namespace OpenSim.Region.Environment.Scenes
2116 } 2116 }
2117 else 2117 else
2118 { 2118 {
2119 if (grp.RootPart != null) 2119 if (!grp.IsDeleted)
2120 { 2120 {
2121 if (grp.RootPart.PhysActor != null) 2121 if (grp.RootPart.PhysActor != null)
2122 { 2122 {
@@ -2688,7 +2688,7 @@ namespace OpenSim.Region.Environment.Scenes
2688 SceneObjectPart part = GetSceneObjectPart(localID); 2688 SceneObjectPart part = GetSceneObjectPart(localID);
2689 if (part != null) // It is a prim 2689 if (part != null) // It is a prim
2690 { 2690 {
2691 if (part.ParentGroup != null && part.ParentGroup.RootPart != null) // Valid 2691 if (part.ParentGroup != null && !part.ParentGroup.IsDeleted) // Valid
2692 { 2692 {
2693 if (part.ParentGroup.RootPart != part) // Child part 2693 if (part.ParentGroup.RootPart != part) // Child part
2694 return; 2694 return;
@@ -4200,7 +4200,7 @@ namespace OpenSim.Region.Environment.Scenes
4200 if (part == null || part.ParentGroup == null) 4200 if (part == null || part.ParentGroup == null)
4201 return; 4201 return;
4202 4202
4203 if (part.ParentGroup.RootPart == null) 4203 if (part.ParentGroup.IsDeleted)
4204 return; 4204 return;
4205 4205
4206 part = part.ParentGroup.RootPart; 4206 part = part.ParentGroup.RootPart;
@@ -4366,7 +4366,7 @@ namespace OpenSim.Region.Environment.Scenes
4366 { 4366 {
4367 SceneObjectGroup grp = (SceneObjectGroup)obj; 4367 SceneObjectGroup grp = (SceneObjectGroup)obj;
4368 4368
4369 if (grp.RootPart != null) 4369 if (!grp.IsDeleted)
4370 { 4370 {
4371 if ((grp.RootPart.Flags & PrimFlags.TemporaryOnRez) != 0) 4371 if ((grp.RootPart.Flags & PrimFlags.TemporaryOnRez) != 0)
4372 { 4372 {