Fix (studio-reported) infinite loop in resync code.

Very stupid mistake in libraries indirect-level building code, was not
skipping 'loop-back' ID pointers.

Note that we also need some level of checks for the case where there
would be an actual dependency loop between libraries, this is not
supposed to be possible, but better be safe than sorry. Will add in next
commit.
This commit is contained in:
Bastien Montagne 2021-05-27 10:47:02 +02:00
parent 46e1ad711c
commit 06d48367fa
1 changed files with 3 additions and 0 deletions

View File

@ -1279,6 +1279,9 @@ bool BKE_lib_override_library_resync(Main *bmain,
static int lib_override_sort_libraries_func(LibraryIDLinkCallbackData *cb_data)
{
if (cb_data->cb_flag & IDWALK_CB_LOOPBACK) {
return IDWALK_RET_NOP;
}
ID *id_owner = cb_data->id_owner;
ID *id = *cb_data->id_pointer;
if (id != NULL && ID_IS_LINKED(id) && id->lib != id_owner->lib) {