diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-09-10 09:09:58 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-09-10 09:20:03 +0300 |
commit | 976b07056d3e7321c9494fab3f1a1a4ea0cde92c (patch) | |
tree | e5b2ef9f0dac2ed806fcf95923708b0026892448 /intern/cycles | |
parent | d2d3ab05b3b078acc10c26e984d534524177a615 (diff) |
Fix T71012: Cycles baking crash with locked-UI & background-mode
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/blender/blender_sync.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp index 0126e5c8874..b68e1931670 100644 --- a/intern/cycles/blender/blender_sync.cpp +++ b/intern/cycles/blender/blender_sync.cpp @@ -723,7 +723,11 @@ void BlenderSync::free_data_after_sync(BL::Depsgraph &b_depsgraph) * footprint during synchronization process. */ const bool is_interface_locked = b_engine.render() && b_engine.render().use_lock_interface(); - const bool can_free_caches = BlenderSession::headless || is_interface_locked; + const bool can_free_caches = (BlenderSession::headless || is_interface_locked) && + /* Baking re-uses the depsgraph multiple times, clearing crashes + * reading un-evaluated mesh data which isn't aligned with the + * geometry we're baking, see T71012. */ + !scene->bake_manager->get_baking(); if (!can_free_caches) { return; } |