diff options
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs index bfa69b2..1976c42 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs | |||
@@ -162,11 +162,8 @@ public sealed class BSShapeCollection : IDisposable | |||
162 | // If the caller needs to know the old body is going away, pass the event up. | 162 | // If the caller needs to know the old body is going away, pass the event up. |
163 | if (bodyCallback != null) bodyCallback(body); | 163 | if (bodyCallback != null) bodyCallback(body); |
164 | 164 | ||
165 | if (PhysicsScene.PE.IsInWorld(PhysicsScene.World, body)) | 165 | // Removing an object not in the world is a NOOP |
166 | { | 166 | PhysicsScene.PE.RemoveObjectFromWorld(PhysicsScene.World, body); |
167 | PhysicsScene.PE.RemoveObjectFromWorld(PhysicsScene.World, body); | ||
168 | if (DDetail) DetailLog("{0},BSShapeCollection.DereferenceBody,removingFromWorld. Body={1}", body.ID, body); | ||
169 | } | ||
170 | 167 | ||
171 | // Zero any reference to the shape so it is not freed when the body is deleted. | 168 | // Zero any reference to the shape so it is not freed when the body is deleted. |
172 | PhysicsScene.PE.SetCollisionShape(PhysicsScene.World, body, null); | 169 | PhysicsScene.PE.SetCollisionShape(PhysicsScene.World, body, null); |