[Bf-blender-cvs] [8e166a5] fracture_modifier: fix, break anyway if there are no constraints at all
Martin Felke
noreply at git.blender.org
Wed Oct 12 12:13:45 CEST 2016
Commit: 8e166a592673f88f8b748fb780fdbcb86e54ffd2
Author: Martin Felke
Date: Wed Oct 12 12:13:37 2016 +0200
Branches: fracture_modifier
https://developer.blender.org/rB8e166a592673f88f8b748fb780fdbcb86e54ffd2
fix, break anyway if there are no constraints at all
===================================================================
M source/blender/blenkernel/intern/rigidbody.c
===================================================================
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index 7fcefe0..085d6ee 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -2121,6 +2121,11 @@ static bool check_constraints(FractureModifierData *fmd, MeshIsland *mi) {
RigidBodyShardCon *con;
int i = 0, broken = 0;
float percentage;
+
+ if (mi->participating_constraint_count == 0) {
+ return true;
+ }
+
for (i = 0; i < mi->participating_constraint_count; i++) {
con = mi->participating_constraints[i];
if (con->physics_constraint && !RB_constraint_is_enabled(con->physics_constraint)) {
More information about the Bf-blender-cvs
mailing list