Fix #133786: Crash when modifying a Grease Pencil NLA track

The issue is that `ANIM_animdata_filter` with the flag `ANIMFILTER_ANIMDATA`
did not actually return only animdata.

The reason for this is in `animdata_filter_grease_pencil_data`,
where there is special handling for this flag.

It seems that returning non-animdata things is expected for Grease Pencil.
So my solution is to just verify the type of `bAnimListElem` before use.

Pull Request: https://projects.blender.org/blender/blender/pulls/133853
This commit is contained in:
Christoph Lendenfeld
2025-01-31 11:31:37 +01:00
committed by Christoph Lendenfeld
parent 63a6bea4e8
commit 037c0c74a1

View File

@@ -69,6 +69,9 @@ void ED_nla_postop_refresh(bAnimContext *ac)
if (!ale->adt) {
continue;
}
if (ale->type != ANIMTYPE_ANIMDATA) {
continue;
}
/* performing auto-blending, extend-mode validation, etc. */
BKE_nla_validate_state(static_cast<AnimData *>(ale->data));