diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-04-03 12:05:16 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-04-11 18:47:38 +0300 |
commit | a0a08c643ee13cddde6416363940a697c5d9c194 (patch) | |
tree | 7e66e1a2e13a1183c9a2fee2b7f6f7379ac7b0aa /source/blender | |
parent | 986329b4c40b1cb0ef5e6cbd695c45d7bffa97af (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.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/library_query.c | 2 |
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; } |