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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-03-20 17:13:54 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-03-20 18:07:27 +0300
commitc188ab7b67e998f5ae972886be492d05b1d4485a (patch)
treea8334d5b49195a853d0e958f5e323701488d54cc /source/blender/depsgraph
parentcdf0df10a6dd812918cabcfc2a702c9cf4a14fef (diff)
Depsgraph: Prevent non-expandable datablocks from being freed
This avoids original image datablock destruction when using copy on write.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index e7a9b4b5a69..bbf28a98aa2 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -374,6 +374,9 @@ void DepsgraphNodeBuilder::begin_build() {
cow_id_hash_ = BLI_ghash_ptr_new("Depsgraph id hash");
foreach (IDDepsNode *id_node, graph_->id_nodes) {
if (deg_copy_on_write_is_expanded(id_node->id_cow)) {
+ if (id_node->id_orig == id_node->id_cow) {
+ continue;
+ }
BLI_ghash_insert(cow_id_hash_,
id_node->id_orig,
id_node->id_cow);