aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs15
1 files changed, 11 insertions, 4 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
index 96cccb7..c439e3e 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
@@ -185,14 +185,21 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
185 get 185 get
186 { 186 {
187 SceneObjectPart my = GetSOP(); 187 SceneObjectPart my = GetSOP();
188 int total = my.ParentGroup.Children.Count; 188 IObject[] rets = null;
189 189
190 IObject[] rets = new IObject[total]; 190 int total = my.ParentGroup.PrimCount;
191
192 rets = new IObject[total];
191 193
192 int i = 0; 194 int i = 0;
193 foreach (KeyValuePair<UUID, SceneObjectPart> pair in my.ParentGroup.Children) 195
196 List<SceneObjectPart> partList = null;
197 lock (my.ParentGroup.Children)
198 partList = new List<SceneObjectPart>(my.ParentGroup.Children.Values);
199
200 foreach (SceneObjectPart part in partList)
194 { 201 {
195 rets[i++] = new SOPObject(m_rootScene, pair.Value.LocalId, m_security); 202 rets[i++] = new SOPObject(m_rootScene, part.LocalId, m_security);
196 } 203 }
197 204
198 return rets; 205 return rets;