[Bf-blender-cvs] [06d48367fae] master: Fix (studio-reported) infinite loop in resync code.

Bastien Montagne noreply at git.blender.org
Thu May 27 10:49:40 CEST 2021


Commit: 06d48367fae6e29426d889081acbe95de0ab663d
Author: Bastien Montagne
Date:   Thu May 27 10:47:02 2021 +0200
Branches: master
https://developer.blender.org/rB06d48367fae6e29426d889081acbe95de0ab663d

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.

===================================================================

M	source/blender/blenkernel/intern/lib_override.c

===================================================================

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) {



More information about the Bf-blender-cvs mailing list