Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-09-10 09:09:58 +0300
committerJeroen Bakker <jeroen@blender.org>2020-09-16 15:36:53 +0300
commit0016e73eda906140a189aa2233f1342a7526ddbd (patch)
tree1267e5aa759df0133606878383574d89470f5308
parent32057453caad89c5f0f25cd0a3305d6682feefef (diff)
Fix T71012: Cycles baking crash with locked-UI & background-mode
-rw-r--r--intern/cycles/blender/blender_sync.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp
index 90736b7630d..2d2bf98f411 100644
--- a/intern/cycles/blender/blender_sync.cpp
+++ b/intern/cycles/blender/blender_sync.cpp
@@ -693,7 +693,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;
}