diff options
author | Robert Adams | 2013-04-21 15:59:39 -0700 |
---|---|---|
committer | Robert Adams | 2013-04-22 16:50:06 -0700 |
commit | e1ac68315491a0962bd4d089f7190e1b82607f43 (patch) | |
tree | 7dbcdca5223b96a7721d443d20f946d3408e7784 /OpenSim/Region/Physics | |
parent | Allow callers to set the invoice parameter for GenericMessage (diff) | |
download | opensim-SC_OLD-e1ac68315491a0962bd4d089f7190e1b82607f43.zip opensim-SC_OLD-e1ac68315491a0962bd4d089f7190e1b82607f43.tar.gz opensim-SC_OLD-e1ac68315491a0962bd4d089f7190e1b82607f43.tar.bz2 opensim-SC_OLD-e1ac68315491a0962bd4d089f7190e1b82607f43.tar.xz |
BulletSim: fix crash when deleting llVolumeDetect enabled objects. Bullet's check for an object being linked into the world does not work for Bullet's ghost objects so BulletSim was deleting the object while it was still linked into the physical world structures.
Diffstat (limited to 'OpenSim/Region/Physics')
-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); |