[Bf-blender-cvs] [eef2698182e] soc-2021-simulation-display: Fix error while freeing non primitive collisions shape mesh in rigidbody

soumya pochiraju noreply at git.blender.org
Tue Sep 14 13:00:06 CEST 2021


Commit: eef2698182eb323bbda10e2496c7e0d6909138c3
Author: soumya pochiraju
Date:   Tue Sep 14 16:26:38 2021 +0530
Branches: soc-2021-simulation-display
https://developer.blender.org/rBeef2698182eb323bbda10e2496c7e0d6909138c3

Fix error while freeing non primitive collisions shape mesh in rigidbody

The function name was changed in master and caused an error during merge
Now it uses a different function to clear the geometry

===================================================================

M	source/blender/blenkernel/intern/rigidbody.c

===================================================================

diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index 56caf7e1ec2..d4d48510444 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -202,7 +202,7 @@ void BKE_rigidbody_free_object(Object *ob, RigidBodyWorld *rbw)
     }
 
     if (rbo->shared->col_shape_draw_data) {
-        BKE_mesh_free(rbo->shared->col_shape_draw_data);
+        BKE_mesh_clear_geometry(rbo->shared->col_shape_draw_data);
         BKE_id_free(NULL, rbo->shared->col_shape_draw_data);
         rbo->shared->col_shape_draw_data = NULL;
     }
@@ -639,7 +639,7 @@ static void rigidbody_validate_sim_shape(RigidBodyWorld *rbw, Object *ob, bool r
     }
     /* Delete old debug drawing mesh data if it exists. */
     if (rbo->shared->col_shape_draw_data) {
-        BKE_mesh_free(rbo->shared->col_shape_draw_data);
+        BKE_mesh_clear_geometry(rbo->shared->col_shape_draw_data);
         BKE_id_free(NULL, rbo->shared->col_shape_draw_data);
         rbo->shared->col_shape_draw_data = NULL;
     }



More information about the Bf-blender-cvs mailing list