[Bf-blender-cvs] [c01dc55] fracture_modifier: crash fix for having less shards than connections in connected fractured objects

Martin Felke noreply at git.blender.org
Mon Dec 12 22:11:53 CET 2016


Commit: c01dc55212195420e214a13449e07ca66676edde
Author: Martin Felke
Date:   Mon Dec 12 22:08:52 2016 +0100
Branches: fracture_modifier
https://developer.blender.org/rBc01dc55212195420e214a13449e07ca66676edde

crash fix for having less shards than connections in connected fractured objects

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

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

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

diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index f9f327e..65373b4 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -1486,6 +1486,10 @@ static MeshIsland* find_closest_meshisland_to_point(FractureModifierData* fmd, O
 		return NULL;
 	}
 
+	if (index >= count) {
+		index = count-1;
+	}
+
 	mi = mi_array[index];
 
 	MEM_freeN(mi_array);




More information about the Bf-blender-cvs mailing list