diff options
author | Sergej Reich <sergej.reich@googlemail.com> | 2013-07-04 12:52:27 +0400 |
---|---|---|
committer | Sergej Reich <sergej.reich@googlemail.com> | 2013-07-04 12:52:27 +0400 |
commit | a51b5c676ec6aa64cb1940371b5760fe140d4db7 (patch) | |
tree | e1221ad688508cf556c6c9f2030a8f1e1657c690 | |
parent | 734e49ade664cf02ec5aa6764300afb1bf52dec4 (diff) |
rigidbody: Code clenup
Remove duplicate null check.
-rw-r--r-- | source/blender/blenkernel/intern/rigidbody.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c index 2675016bc4c..a300e2f2156 100644 --- a/source/blender/blenkernel/intern/rigidbody.c +++ b/source/blender/blenkernel/intern/rigidbody.c @@ -936,10 +936,9 @@ void BKE_rigidbody_remove_constraint(Scene *scene, Object *ob) RigidBodyWorld *rbw = scene->rigidbody_world; RigidBodyCon *rbc = ob->rigidbody_constraint; - if (rbw) { - /* remove from rigidbody world, free object won't do this */ - if (rbw && rbw->physics_world && rbc->physics_constraint) - RB_dworld_remove_constraint(rbw->physics_world, rbc->physics_constraint); + /* remove from rigidbody world, free object won't do this */ + if (rbw && rbw->physics_world && rbc->physics_constraint) { + RB_dworld_remove_constraint(rbw->physics_world, rbc->physics_constraint); } /* remove object's settings */ BKE_rigidbody_free_constraint(ob); |