Fix #106246: Crash on deleting the multi-level hierarchy #106374

Closed
Pratik Borhade wants to merge 1 commits from PratikPB2123/blender:T106246-del-hierarchy-crash into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

1 Commits

Author SHA1 Message Date
Pratik Borhade 4b8200666c Fix #106246: Crash on deleting the multi-level hierarchy
Crash occurs due to accessing the pointer which points to garbage
memory. In brief, `base_next` points to next base element (`base->next`) which is
deleted in previous iteration. After `BKE_library_ID_is_indirectly_used`
call, viewlayer is synced and frees the `object_bases` list. It results
`base_next` pointing to garbage memory.
To fix this, point to `base->next` after `BKE_library_ID_is_indirectly_used` function call,
2023-03-31 15:59:29 +05:30