Fix (unreported) assert in recursive 'foreach id' iterating code.

owner ID pointer needs to be reset after initial usage, for the
recursively processed 'children' IDs.
This commit is contained in:
Bastien Montagne 2024-06-24 13:33:21 +02:00
parent 696848204c
commit a94798d31c

View file

@ -257,7 +257,7 @@ static bool library_foreach_ID_link(Main *bmain,
} \
((void)0)
for (; id != nullptr; id = (flag & IDWALK_RECURSE) ? BLI_LINKSTACK_POP(data.ids_todo) : nullptr)
for (; id != nullptr; id = (flag & IDWALK_RECURSE) ? BLI_LINKSTACK_POP(data.ids_todo) : nullptr, owner_id = nullptr)
{
data.self_id = id;
/* owner ID is same as self ID, except for embedded ID case. */