Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2019-04-03 12:05:16 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-04-11 18:47:38 +0300
commita0a08c643ee13cddde6416363940a697c5d9c194 (patch)
tree7e66e1a2e13a1183c9a2fee2b7f6f7379ac7b0aa
parent986329b4c40b1cb0ef5e6cbd695c45d7bffa97af (diff)
Fix (unreported) potential infinite loop over collections' parents pointers.
It is crucial to properly tag as loopback that kind of pointers, otherwise some users of libquery's foreach_ID might end up in infinite loops.
-rw-r--r--source/blender/blenkernel/intern/library_query.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/library_query.c b/source/blender/blenkernel/intern/library_query.c
index cdbbc404538..4fc1ea6bb62 100644
--- a/source/blender/blenkernel/intern/library_query.c
+++ b/source/blender/blenkernel/intern/library_query.c
@@ -783,7 +783,7 @@ static void library_foreach_ID_link(
CALLBACK_INVOKE(child->collection, IDWALK_CB_NEVER_SELF | IDWALK_CB_USER);
}
for (CollectionParent *parent = collection->parents.first; parent; parent = parent->next) {
- CALLBACK_INVOKE(parent->collection, IDWALK_CB_NEVER_SELF);
+ CALLBACK_INVOKE(parent->collection, IDWALK_CB_NEVER_SELF | IDWALK_CB_LOOPBACK);
}
break;
}