rigidbody: Properly handle constrained objects not having rigid bodies
This is a pretty rare case that can be triggered by switching rigid body and constraint groups before simulation was validated. Code checked for existing physics objects but was missing else block.
This commit is contained in:
@@ -635,6 +635,9 @@ void BKE_rigidbody_validate_sim_constraint(RigidBodyWorld *rbw, Object *ob, shor
|
||||
break;
|
||||
}
|
||||
}
|
||||
else { /* can't create constraint without both rigid bodies */
|
||||
return;
|
||||
}
|
||||
|
||||
RB_constraint_set_enabled(rbc->physics_constraint, rbc->flag & RBC_FLAG_ENABLED);
|
||||
|
||||
|
Reference in New Issue
Block a user