From 6f598ecc1af3d6e94d5a03097b20618452425859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 21 Apr 2020 13:23:51 +0200 Subject: Fix T75472 Crash on "Remove Empty Animation Data" in NLA editor The `ANIMFILTER_NODUPLIS` option, to prevent duplicates in the list of animation data to be freed, was missing. This caused a use-after-free. --- source/blender/editors/animation/anim_channels_edit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/animation') diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index a1b1c7815d8..4e3dc3cb220 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -2268,7 +2268,8 @@ static int animchannels_clean_empty_exec(bContext *C, wmOperator *UNUSED(op)) } /* get animdata blocks */ - filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_ANIMDATA); + filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_ANIMDATA | + ANIMFILTER_NODUPLIS); ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); for (ale = anim_data.first; ale; ale = ale->next) { -- cgit v1.2.3