diff options
author | Bastien Montagne <bastien@blender.org> | 2021-05-27 11:47:02 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-05-27 11:49:31 +0300 |
commit | 06d48367fae6e29426d889081acbe95de0ab663d (patch) | |
tree | 589fca2eb7716e2a8a3da29190d98687d850cd0d /source/blender/blenkernel/intern | |
parent | 46e1ad711ce7b28c4c7b6cd81f2024dd63acda67 (diff) |
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.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/lib_override.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/lib_override.c b/source/blender/blenkernel/intern/lib_override.c index 1aa94f82eb3..e16a9081b35 100644 --- a/source/blender/blenkernel/intern/lib_override.c +++ b/source/blender/blenkernel/intern/lib_override.c @@ -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) { |