From 74888cdbfd523d70ea0573e4452bf65c25b3a888 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 13 Jul 2022 11:15:19 +0200 Subject: Fix (studio-reported) issue in remapping code. Not clearing runtime remapping data for the new ID as well as the old one can lead to false stale data there, wichi could e.g. make indirectly linked data be tagged as directly linked. This would generate an error report on file write when hapening on ShapeKey ID, since that type is not allowed to be directly linked. --- source/blender/blenkernel/intern/lib_remap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern/lib_remap.c') diff --git a/source/blender/blenkernel/intern/lib_remap.c b/source/blender/blenkernel/intern/lib_remap.c index 246999a1179..28b0337d9a2 100644 --- a/source/blender/blenkernel/intern/lib_remap.c +++ b/source/blender/blenkernel/intern/lib_remap.c @@ -428,10 +428,13 @@ static void libblock_remap_data_update_tags(ID *old_id, ID *new_id, void *user_d } static void libblock_remap_reset_remapping_status_callback(ID *old_id, - ID *UNUSED(new_id), + ID *new_id, void *UNUSED(user_data)) { BKE_libblock_runtime_reset_remapping_status(old_id); + if (new_id != NULL) { + BKE_libblock_runtime_reset_remapping_status(new_id); + } } /** -- cgit v1.2.3