aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-01-31 20:30:30 +0000
committerJustin Clark-Casey (justincc)2012-01-31 20:30:30 +0000
commit10b9348071094122d5e2dd636f7cce9c0b25f0a9 (patch)
tree4c0aa079b8293d197aed2038442b1487e271b9ba /OpenSim/Region/Framework
parentAdd torture tests to test adding 10,000, 100,000 and 200,000 single prim scen... (diff)
downloadopensim-SC_OLD-10b9348071094122d5e2dd636f7cce9c0b25f0a9.zip
opensim-SC_OLD-10b9348071094122d5e2dd636f7cce9c0b25f0a9.tar.gz
opensim-SC_OLD-10b9348071094122d5e2dd636f7cce9c0b25f0a9.tar.bz2
opensim-SC_OLD-10b9348071094122d5e2dd636f7cce9c0b25f0a9.tar.xz
Remove scene object null check on SceneGraph.AddSceneObject(). Complain explicitly if there's an attempt to add any object with a zero UUID.
Callers themselves need to check that they're not attempting to add a null scene object.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 006f9c6..06de72f 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -353,8 +353,14 @@ namespace OpenSim.Region.Framework.Scenes
353 /// </returns> 353 /// </returns>
354 protected bool AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates) 354 protected bool AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates)
355 { 355 {
356 if (sceneObject == null || sceneObject.RootPart.UUID == UUID.Zero) 356 if (sceneObject.UUID == UUID.Zero)
357 {
358 m_log.ErrorFormat(
359 "[SCENEGRAPH]: Tried to add scene object {0} to {1} with illegal UUID of {2}",
360 sceneObject.Name, m_parentScene.RegionInfo.RegionName, UUID.Zero);
361
357 return false; 362 return false;
363 }
358 364
359 if (Entities.ContainsKey(sceneObject.UUID)) 365 if (Entities.ContainsKey(sceneObject.UUID))
360 { 366 {