diff options
Diffstat (limited to 'source/blender/depsgraph/intern/builder/deg_builder_relations.cc')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index fff83108ea1..f64c4f5aff0 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -1518,12 +1518,12 @@ void DepsgraphRelationBuilder::build_rigidbody(Scene *scene) if (rbw->constraints) { FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(rbw->constraints, object) { - if (!object->rigidbody_constraint) { + RigidBodyCon *rbc = object->rigidbody_constraint; + if (rbc == NULL || rbc->ob1 == NULL || rbc->ob2 == NULL) { + /* When either ob1 or ob2 is NULL, the constraint doesn't work. */ continue; } - RigidBodyCon *rbc = object->rigidbody_constraint; - /* final result of the constraint object's transform controls how the * constraint affects the physics sim for these objects */ |