BulletSim: fix exception when re-creating the terrain when loading an OAR file

This commit is contained in:
Robert Adams
2013-01-07 16:04:21 -08:00
parent 2e5222055f
commit 599dbc3d95

View File

@@ -142,6 +142,8 @@ public sealed class BSTerrainMesh : BSTerrainPhys
PhysicsScene.PE.RemoveObjectFromWorld(PhysicsScene.World, m_terrainBody);
// Frees both the body and the shape.
PhysicsScene.PE.DestroyObject(PhysicsScene.World, m_terrainBody);
m_terrainBody.Clear();
m_terrainShape.Clear();
}
}