diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2012-04-15 16:49:34 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2012-04-15 16:49:34 +0400 |
commit | 6627fe3f75217bd288bb3fb53dc7bb1dd20c3706 (patch) | |
tree | e963298df27cc66e3015b3fd5311611797f57772 /source/gameengine | |
parent | 5f0c43d2c2835554ab6f6dc6bafd4ca760996427 (diff) |
BGE bug #30555: crash in Replace Mesh when physics shape is triangle mesh and new mesh has no collision faces. The fix consists in keeping the previous physics shape, which is not quite correct, but the situation is unusual anyway.
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/Physics/Bullet/CcdPhysicsController.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp index 73ba187d732..9a85471fb9a 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp +++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp @@ -1918,6 +1918,10 @@ bool CcdShapeConstructionInfo::UpdateMesh(class KX_GameObject* gameobj, class RA } } + // This case happens when none of the polys are colliders + if (tot_bt_tris == 0 || tot_bt_verts == 0) + return false; + m_vertexArray.resize(tot_bt_verts*3); btScalar *bt= &m_vertexArray[0]; |