Fix #118307: Outliner crash with additional constraint on overridden bone #118573

Closed
Philipp Oeser wants to merge 1 commits from lichtwerk/blender:118307 into blender-v4.1-release

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

1 Commits

Author SHA1 Message Date
Philipp Oeser 60e0f11c89 Fix #118307: Outliner crash with additional constraint on overrdden bone
Since `IDOverrideLibraryProperty` apparently stores its rna_path with
string-based collection keys, we have to make sure we also use string-
based keys elsewhere in `OverrideRNAPathTreeBuilder::build_path` and
down the line, otherwise:
- we get duplicate collection entries ("pose.bones[1].constraints" vs.
"pose.bones["Bone.001"].constraints")
- crashes may occur (we are reading on an already freed `TreeElement`
see #118307 for ASAN output)

So now make sure we are using string-based collection keys when we can
so the TreeElements match /and dont get duplicated).

NOTE: the duplication of entries came with 67b92418ee
2024-02-21 16:18:36 +01:00