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.
This commit is contained in:
Sergey Sharybin 2018-11-23 12:00:34 +01:00
parent 4b06d0bf51
commit fc830ce78f
Notes: blender-bot 2023-02-14 05:05:55 +01:00
Referenced by issue #57616, Deleting particle system instance object leads to crash
1 changed files with 2 additions and 1 deletions

View File

@ -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);