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.iar_mods
parent
f3780b9eae
commit
10b9348071
|
@ -353,8 +353,14 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// </returns>
|
||||
protected bool AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates)
|
||||
{
|
||||
if (sceneObject == null || sceneObject.RootPart.UUID == UUID.Zero)
|
||||
if (sceneObject.UUID == UUID.Zero)
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[SCENEGRAPH]: Tried to add scene object {0} to {1} with illegal UUID of {2}",
|
||||
sceneObject.Name, m_parentScene.RegionInfo.RegionName, UUID.Zero);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Entities.ContainsKey(sceneObject.UUID))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue