diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2019-10-15 12:03:32 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2019-10-15 12:03:32 +0300 |
commit | 0473815d481306a3d33882d068f4e195cba33f5c (patch) | |
tree | d1b74e299fadaede12186844cf8446a266b75c00 /source | |
parent | 3cdcd1fa9f0896632b05cc217649ac529f8e2e08 (diff) | |
parent | d54ccb90ab573bd27303a884e91484d6a00bd167 (diff) |
Merge branch 'blender-v2.81-release'
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/rigidbody.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c index 68750cf1e68..c57808f3dee 100644 --- a/source/blender/blenkernel/intern/rigidbody.c +++ b/source/blender/blenkernel/intern/rigidbody.c @@ -1680,9 +1680,12 @@ static void rigidbody_update_simulation(Depsgraph *depsgraph, float ctime = DEG_get_ctime(depsgraph); /* update world */ - if (rebuild) { - BKE_rigidbody_validate_sim_world(scene, rbw, true); + /* Note physics_world can get NULL when undoing the deletion of the last object in it (see + * T70667). */ + if (rebuild || rbw->shared->physics_world == NULL) { + BKE_rigidbody_validate_sim_world(scene, rbw, rebuild); } + rigidbody_update_sim_world(scene, rbw); /* XXX TODO For rebuild: remove all constraints first. |