diff options
Diffstat (limited to 'source/blender/blenkernel/intern/rigidbody.c')
-rw-r--r-- | source/blender/blenkernel/intern/rigidbody.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c index 9ddf0cd2d68..2675016bc4c 100644 --- a/source/blender/blenkernel/intern/rigidbody.c +++ b/source/blender/blenkernel/intern/rigidbody.c @@ -914,12 +914,10 @@ void BKE_rigidbody_remove_object(Scene *scene, Object *ob) if (obt && obt->rigidbody_constraint) { rbc = obt->rigidbody_constraint; if (rbc->ob1 == ob) { - rbc->ob1 = NULL; - rbc->flag |= RBC_FLAG_NEEDS_VALIDATE; + BKE_rigidbody_remove_constraint(scene, obt); } if (rbc->ob2 == ob) { - rbc->ob2 = NULL; - rbc->flag |= RBC_FLAG_NEEDS_VALIDATE; + BKE_rigidbody_remove_constraint(scene, obt); } } } |