[Bf-blender-cvs] [fc830ce78f6] blender2.8: Fix T57616: Deleting particle system instance object leads to crash

Sergey Sharybin noreply at git.blender.org
Fri Nov 23 12:04:04 CET 2018


Commit: fc830ce78f67ce3248b80f0e2a53cbc978f7040c
Author: Sergey Sharybin
Date:   Fri Nov 23 12:00:34 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBfc830ce78f67ce3248b80f0e2a53cbc978f7040c

Fix T57616: Deleting particle system instance object leads to crash

Explicitly tag copy-on-write form library remap. Previously, this
tag was used implicitly via geometry/transform tagging, which worked
ok for objects. For non-objects we do need to ensure all copies has
correct pointer and the only way to do so is to pass tag explicitly.

There is probably more places in the library remap where this is
needed, but not being familiar with the code makes it difficult to
spot where possible tags are missing.

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

M	source/blender/blenkernel/intern/library_remap.c

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

diff --git a/source/blender/blenkernel/intern/library_remap.c b/source/blender/blenkernel/intern/library_remap.c
index 404028f336e..ba151ca6925 100644
--- a/source/blender/blenkernel/intern/library_remap.c
+++ b/source/blender/blenkernel/intern/library_remap.c
@@ -241,7 +241,8 @@ static int foreach_libblock_remap_callback(void *user_data, ID *id_self, ID **id
 		else {
 			if (!is_never_null) {
 				*id_p = new_id;
-				DEG_id_tag_update_ex(id_remap_data->bmain, id_self, DEG_TAG_TRANSFORM | DEG_TAG_TIME | DEG_TAG_GEOMETRY);
+				DEG_id_tag_update_ex(id_remap_data->bmain, id_self,
+				                     DEG_TAG_COPY_ON_WRITE | DEG_TAG_TRANSFORM | DEG_TAG_GEOMETRY);
 			}
 			if (cb_flag & IDWALK_CB_USER) {
 				id_us_min(old_id);



More information about the Bf-blender-cvs mailing list