From 037c0c74a1a56d1546a8422d953d4e2a7edef370 Mon Sep 17 00:00:00 2001 From: Christoph Lendenfeld Date: Fri, 31 Jan 2025 11:31:37 +0100 Subject: [PATCH] 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 --- source/blender/editors/space_nla/nla_edit.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/blender/editors/space_nla/nla_edit.cc b/source/blender/editors/space_nla/nla_edit.cc index bc5441e54a1..0764387a9aa 100644 --- a/source/blender/editors/space_nla/nla_edit.cc +++ b/source/blender/editors/space_nla/nla_edit.cc @@ -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(ale->data));