[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45657] trunk/blender/source/gameengine/ Physics/Bullet/CcdPhysicsController.cpp: BGE bug #30555: crash in Replace Mesh when physics shape is triangle mesh and new mesh has no collision faces .

Benoit Bolsee benoit.bolsee at online.be
Sun Apr 15 14:49:35 CEST 2012


Revision: 45657
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45657
Author:   ben2610
Date:     2012-04-15 12:49:34 +0000 (Sun, 15 Apr 2012)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp

Modified: trunk/blender/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
===================================================================
--- trunk/blender/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp	2012-04-15 11:47:08 UTC (rev 45656)
+++ trunk/blender/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp	2012-04-15 12:49:34 UTC (rev 45657)
@@ -1918,6 +1918,10 @@
 			}
 		}
 
+		// 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];
 




More information about the Bf-blender-cvs mailing list