Fix: crash baking empty rigid body world #107537

Merged
Philipp Oeser merged 1 commits from lichtwerk/blender:107420_b into main 2023-05-02 17:57:28 +02:00

1 Commits

Author SHA1 Message Date
Philipp Oeser 3637e2d104 Fix: crash baking empty rigid body world
Found investigating #107420.

Steps to reproduce were:
- remove all objects from the scene
- add rigid body world
- bake
- crash

BKE_ptcache_bake would assume a cache can always be found, but with an
empty rigid body world this is not the case -- accessing flags woud then
crash.

Now just check if we actually have a cache.
2023-05-02 13:14:05 +02:00