From b89f7eca359eebac1f105358c33b0ff45a774767 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 14 Sep 2021 18:02:58 +0100 Subject: [PATCH] oops BUG fix: do not modify shared list of scene presences --- OpenSim/Region/Framework/Scenes/Scene.cs | 5 +++-- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 3 --- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index ef366e6449..e1d1c1b1b8 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -5270,12 +5270,13 @@ Label_GroupsDone: /// /// This method will return both root and child scene presences. /// - /// Consider using ForEachScenePresence() or ForEachRootScenePresence() if possible since these will not + /// Consider using only on ForEachScenePresence() or ForEachRootScenePresence() if possible since these will not /// involving creating a new List object. /// /// - /// A list of the scene presences. Adding or removing from the list will not affect the presences in the scene. + /// The shared list of the scene presences. /// + /// WARNING DO NOT MODIFY RETURNED VALUE public List GetScenePresences() { //return new List(m_sceneGraph.GetScenePresences()); diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index e71e8a932e..90ad04a432 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -6883,8 +6883,6 @@ namespace OpenSim.Region.Framework.Scenes } } } // where public end - - allpresences.Clear(); } else { @@ -6937,7 +6935,6 @@ namespace OpenSim.Region.Framework.Scenes } } } - allpresences.Clear(); } // now on a private parcel end else