From 84289cfb4b676e2df38d37602a8bb7811cc38d18 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Wed, 19 Mar 2008 19:33:38 +0000 Subject: [PATCH] Fix server crash when setting prims physical under basic physics. --- OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 4c96e4e420..67048bf8d5 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -1329,8 +1329,12 @@ namespace OpenSim.Region.Environment.Scenes new PhysicsVector(Scale.X, Scale.Y, Scale.Z), new Quaternion(RotationOffset.W, RotationOffset.X, RotationOffset.Y, RotationOffset.Z), usePhysics); - PhysActor.LocalID = LocalId; - DoPhysicsPropertyUpdate(usePhysics, true); + + if (PhysActor != null) + { + PhysActor.LocalID = LocalId; + DoPhysicsPropertyUpdate(usePhysics, true); + } } else {