[Bf-blender-cvs] [0b20de36082] temp-fracture-modifier-2.8: attempt to fix crash with dynamic + constraints (but the problems are multiple depsgraph threads here)
Martin Felke
noreply at git.blender.org
Sat Mar 2 19:40:31 CET 2019
Commit: 0b20de36082764e0ce34ceb8dbfb81aea30a68a5
Author: Martin Felke
Date: Sat Mar 2 19:14:34 2019 +0100
Branches: temp-fracture-modifier-2.8
https://developer.blender.org/rB0b20de36082764e0ce34ceb8dbfb81aea30a68a5
attempt to fix crash with dynamic + constraints (but the problems are multiple depsgraph threads here)
===================================================================
M source/blender/blenkernel/intern/fracture_constraints.c
===================================================================
diff --git a/source/blender/blenkernel/intern/fracture_constraints.c b/source/blender/blenkernel/intern/fracture_constraints.c
index 8dfe921a860..bacf8e98061 100644
--- a/source/blender/blenkernel/intern/fracture_constraints.c
+++ b/source/blender/blenkernel/intern/fracture_constraints.c
@@ -402,20 +402,25 @@ void BKE_fracture_meshislands_connect(Scene* sc, FractureModifierData *fmd, Shar
if (ok) {
/* search local constraint list instead of global one !!! saves lots of time */
int i;
- for (i = 0; i < mi1->participating_constraint_count; i++) {
- con = mi1->participating_constraints[i];
- if (con && ((con->mi1 == mi2) || (con->mi2 == mi2))) {
- con_found = true;
- break;
+
+ if (mi1->participating_constraints != NULL) {
+ for (i = 0; i < mi1->participating_constraint_count; i++) {
+ con = mi1->participating_constraints[i];
+ if (con && ((con->mi1 == mi2) || (con->mi2 == mi2))) {
+ con_found = true;
+ break;
+ }
}
}
if (!con_found) {
- for (i = 0; i < mi2->participating_constraint_count; i++) {
- con = mi2->participating_constraints[i];
- if (con && ((con->mi1 == mi1) || (con->mi2 == mi1))) {
- con_found = true;
- break;
+ if (mi2->participating_constraints != NULL) {
+ for (i = 0; i < mi2->participating_constraint_count; i++) {
+ con = mi2->participating_constraints[i];
+ if (con && ((con->mi1 == mi1) || (con->mi2 == mi1))) {
+ con_found = true;
+ break;
+ }
}
}
}
More information about the Bf-blender-cvs
mailing list