aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/ScenePresence.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/ScenePresence.cs
parentfixing warnings in YProlog language support (diff)
downloadopensim-SC_OLD-d54b6608a7acfa7fc9fd074f2fbd241519067fcb.zip
opensim-SC_OLD-d54b6608a7acfa7fc9fd074f2fbd241519067fcb.tar.gz
opensim-SC_OLD-d54b6608a7acfa7fc9fd074f2fbd241519067fcb.tar.bz2
opensim-SC_OLD-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/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index c91027c..935c51b 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -637,8 +637,10 @@ namespace OpenSim.Region.Environment.Scenes
637 while (m_partsUpdateQueue.Count > 0) 637 while (m_partsUpdateQueue.Count > 0)
638 { 638 {
639 SceneObjectPart part = m_partsUpdateQueue.Dequeue(); 639 SceneObjectPart part = m_partsUpdateQueue.Dequeue();
640 if (part.ParentGroup == null || part.ParentGroup.RootPart == null) 640
641 if (part.ParentGroup == null || part.ParentGroup.IsDeleted)
641 continue; 642 continue;
643
642 if (m_updateTimes.ContainsKey(part.UUID)) 644 if (m_updateTimes.ContainsKey(part.UUID))
643 { 645 {
644 ScenePartUpdate update = m_updateTimes[part.UUID]; 646 ScenePartUpdate update = m_updateTimes[part.UUID];
@@ -2582,10 +2584,8 @@ namespace OpenSim.Region.Environment.Scenes
2582 if (gobj == null) 2584 if (gobj == null)
2583 return false; 2585 return false;
2584 2586
2585 if (gobj.RootPart == null) 2587 if (gobj.IsDeleted)
2586 {
2587 return false; 2588 return false;
2588 }
2589 } 2589 }
2590 } 2590 }
2591 return true; 2591 return true;
@@ -2598,7 +2598,7 @@ namespace OpenSim.Region.Environment.Scenes
2598 // Validate 2598 // Validate
2599 foreach (SceneObjectGroup gobj in m_attachments) 2599 foreach (SceneObjectGroup gobj in m_attachments)
2600 { 2600 {
2601 if (gobj == null || gobj.RootPart == null) 2601 if (gobj == null || gobj.IsDeleted)
2602 return false; 2602 return false;
2603 } 2603 }
2604 2604