[Bf-blender-cvs] [2bd2a2ac033] blender2.8: Depsgraph: Extra sanity checks for copy-on-write tagging

Sergey Sharybin noreply at git.blender.org
Tue May 1 10:24:37 CEST 2018


Commit: 2bd2a2ac0334e428b3b5e8340737d0992a2c3d3a
Author: Sergey Sharybin
Date:   Mon Apr 30 17:31:59 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB2bd2a2ac0334e428b3b5e8340737d0992a2c3d3a

Depsgraph: Extra sanity checks for copy-on-write tagging

===================================================================

M	source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc

===================================================================

diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
index 3f80bf00be2..cb03c0dc92c 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
@@ -800,6 +800,8 @@ bool deg_validate_copy_on_write_datablock(ID *id_cow)
 
 void deg_tag_copy_on_write_id(ID *id_cow, const ID *id_orig)
 {
+	BLI_assert(id_cow != id_orig);
+	BLI_assert((id_orig->tag & LIB_TAG_COPY_ON_WRITE) == 0);
 	id_cow->tag |= LIB_TAG_COPY_ON_WRITE;
 	id_cow->orig_id = (ID *)id_orig;
 }



More information about the Bf-blender-cvs mailing list