From 9d7e503ce3dd19ede611f7831d455aae5bf6e1e1 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 18 Nov 2008 17:21:33 +0000 Subject: Prevent a nullref when building new prims while others watch --- OpenSim/Region/Environment/Scenes/Scene.cs | 2 +- OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index e374bba..7ea4686 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -1772,8 +1772,8 @@ namespace OpenSim.Region.Environment.Scenes AdaptTree(ref shape); } - sceneObject.SetGroup(groupID, null); AddNewSceneObject(sceneObject, true); + sceneObject.SetGroup(groupID, null); return sceneObject; } diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 380557b..2d62d66 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -1699,6 +1699,8 @@ namespace OpenSim.Region.Environment.Scenes public void QueueForUpdateCheck() { + if (m_scene == null) // Need to check here as it's null during object creation + return; m_scene.m_sceneGraph.AddToUpdateList(this); } -- cgit v1.1