[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60310] branches/soc-2013-rigid_body_sim/ intern/rigidbody/rb_bullet_api.cpp: rigidbody: Fix crash switching to a mesh shape during simulation while using deformation

Sergej Reich sergej.reich at googlemail.com
Sun Sep 22 13:32:26 CEST 2013


Revision: 60310
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60310
Author:   sergof
Date:     2013-09-22 11:32:26 +0000 (Sun, 22 Sep 2013)
Log Message:
-----------
rigidbody: Fix crash switching to a mesh shape during simulation while using deformation

Thanks to Thomas Beck (plasmasolutions) for the report.

Modified Paths:
--------------
    branches/soc-2013-rigid_body_sim/intern/rigidbody/rb_bullet_api.cpp

Modified: branches/soc-2013-rigid_body_sim/intern/rigidbody/rb_bullet_api.cpp
===================================================================
--- branches/soc-2013-rigid_body_sim/intern/rigidbody/rb_bullet_api.cpp	2013-09-22 10:25:56 UTC (rev 60309)
+++ branches/soc-2013-rigid_body_sim/intern/rigidbody/rb_bullet_api.cpp	2013-09-22 11:32:26 UTC (rev 60310)
@@ -1000,7 +1000,7 @@
 
 void RB_shape_trimesh_update(rbCollisionShape *shape, float *vertices, int num_verts, int vert_stride, float min[3], float max[3])
 {
-	if (num_verts != shape->mesh->num_vertices)
+	if (shape->mesh == NULL || num_verts != shape->mesh->num_vertices)
 		return;
 	
 	for (int i = 0; i < num_verts; i++) {




More information about the Bf-blender-cvs mailing list