diff options
author | Bastien Montagne <bastien@blender.org> | 2020-04-29 22:35:13 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-04-29 22:35:13 +0300 |
commit | cd833d887995d210b5998bd7d17c59cbb8fe0cba (patch) | |
tree | 9bf6ba277d475d384c0c0d22d84fba9b23f951fe /source/blender/blenloader/intern/readfile.c | |
parent | a54c1f1e77147352dfab1233ef63307e87e9f09c (diff) |
Readfile: debug check all IDs are properly linked at the end.
Should prevent issue fixed by previous commit to happen again (since
read code, especially in undo case, is not really straight forward to
follow anymore).
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 98e6369b634..cb567147224 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -10137,6 +10137,15 @@ static void lib_link_all(FileData *fd, Main *bmain) * 'permanently' in our data structures... */ BKE_main_collections_parent_relations_rebuild(bmain); } + +#ifndef NDEBUG + /* Double check we do not have any 'need link' tag remaining, this should never be the case once + * this function has run. */ + FOREACH_MAIN_ID_BEGIN (bmain, id) { + BLI_assert((id->tag & LIB_TAG_NEED_LINK) == 0); + } + FOREACH_MAIN_ID_END; +#endif } /** \} */ |