aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapes.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
index 262d734..72d039b 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
@@ -283,8 +283,13 @@ public class BSShapeNative : BSShape
283 public override BSShape GetReference(BSScene pPhysicsScene, BSPhysObject pPrim) 283 public override BSShape GetReference(BSScene pPhysicsScene, BSPhysObject pPrim)
284 { 284 {
285 // Native shapes are not shared so we return a new shape. 285 // Native shapes are not shared so we return a new shape.
286 return new BSShapeNative(CreatePhysicalNativeShape(pPhysicsScene, pPrim, 286 BSShape ret = null;
287 physShapeInfo.shapeType, (FixedShapeKey)physShapeInfo.shapeKey) ); 287 lock (physShapeInfo)
288 {
289 ret = new BSShapeNative(CreatePhysicalNativeShape(pPhysicsScene, pPrim,
290 physShapeInfo.shapeType, (FixedShapeKey)physShapeInfo.shapeKey));
291 }
292 return ret;
288 } 293 }
289 294
290 // Make this reference to the physical shape go away since native shapes are not shared. 295 // Make this reference to the physical shape go away since native shapes are not shared.