From 2a1d12d7a0edd7ecffda3c5e1bf5c3b512976bbb Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 11 Jul 2022 19:09:56 +0200 Subject: Fix (studio-reported) crash in ID remapping code on rare cases. Some ID types did not have a filter value, even though they would be used in remapping code, leading to missing remappings. In that specific case, shape keys would actually never be properly remapped. Reproducible in r1230 of `Heist/pro/animation_test/einar/einar_new_expression_shapes2.blend`, --- source/blender/blenkernel/intern/lib_id_remapper.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/blenkernel/intern/lib_id_remapper.cc') diff --git a/source/blender/blenkernel/intern/lib_id_remapper.cc b/source/blender/blenkernel/intern/lib_id_remapper.cc index 7e75e0f5d93..98ac9110a48 100644 --- a/source/blender/blenkernel/intern/lib_id_remapper.cc +++ b/source/blender/blenkernel/intern/lib_id_remapper.cc @@ -36,6 +36,7 @@ struct IDRemapper { BLI_assert(old_id != nullptr); BLI_assert(new_id == nullptr || (GS(old_id->name) == GS(new_id->name))); mappings.add(old_id, new_id); + BLI_assert(BKE_idtype_idcode_to_idfilter(GS(old_id->name)) != 0); source_types |= BKE_idtype_idcode_to_idfilter(GS(old_id->name)); } -- cgit v1.2.3