From ebc062191ce19fad42aa68da3130cf2ca1bbb9aa Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 9 Mar 2023 16:31:07 +0100 Subject: [PATCH] LibOverride: Do not assert on invalid resync situation. Some checks here are really critical and should assert, but that one is more an indication that something is not going right, though data itself should still be mostly valid, so better warn the user with a LOG warning, than be silent in release builds, and crash in debug ones. --- source/blender/blenkernel/intern/lib_override.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/source/blender/blenkernel/intern/lib_override.cc b/source/blender/blenkernel/intern/lib_override.cc index 065ee010e72..56143273862 100644 --- a/source/blender/blenkernel/intern/lib_override.cc +++ b/source/blender/blenkernel/intern/lib_override.cc @@ -2525,8 +2525,16 @@ static void lib_override_library_main_resync_on_library_indirect_level( BLI_assert(id_resync_root_iter == id_resync_roots->list && id_resync_root_iter == id_resync_roots->last_node); } - BLI_assert(!lib_override_resync_tagging_finalize_recurse( - bmain, id_resync_root, id_roots, library_indirect_level, true)); + if (lib_override_resync_tagging_finalize_recurse( + bmain, id_resync_root, id_roots, library_indirect_level, true)) { + CLOG_WARN(&LOG, + "Resync root ID still has ancestors tagged for resync, this should not happen " + "at this point." + "\n\tRoot ID: %s" + "\n\tResync root ID: %s", + id_root->name, + id_resync_root->name); + } } BLI_ghashIterator_step(id_roots_iter); }