diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index e6b83646ab..b5bb951a55 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -352,8 +352,11 @@ namespace OpenSim.Region.Environment.Scenes private void RemoveFromPhysicalScene() { - m_scene.PhysScene.RemoveAvatar( this.PhysicsActor ); - this.PhysicsActor = null; + if (this.PhysicsActor) + { + m_scene.PhysScene.RemoveAvatar(this.PhysicsActor); + this.PhysicsActor = null; + } } /// @@ -919,4 +922,4 @@ namespace OpenSim.Region.Environment.Scenes RemoveFromPhysicalScene(); } } -} \ No newline at end of file +}