From a0a08c643ee13cddde6416363940a697c5d9c194 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 3 Apr 2019 11:05:16 +0200 Subject: 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. --- source/blender/blenkernel/intern/library_query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern') 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; } -- cgit v1.2.3