From 051a341cf00ca1518b50b43bb95f95bc24bf2398 Mon Sep 17 00:00:00 2001 From: Falk David Date: Wed, 6 Jul 2022 17:09:00 +0200 Subject: Fix T99491: Crash when opening modifiers panel This crashed because in `get_active_fcurve_channel`, the filter did not filter out channels with no fcurve. The fix adds the filter `ANIMFILTER_FCURVESONLY`. See rB92d7f9ac56e0ff1e65c364487542dfb7c32a0a67 for the new filter. Maniphest Tasks: T99491 Differential Revision: https://developer.blender.org/D15386 --- source/blender/editors/space_graph/graph_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender') diff --git a/source/blender/editors/space_graph/graph_utils.c b/source/blender/editors/space_graph/graph_utils.c index a813e6ae245..51af795893f 100644 --- a/source/blender/editors/space_graph/graph_utils.c +++ b/source/blender/editors/space_graph/graph_utils.c @@ -81,7 +81,7 @@ void ED_drivers_editor_init(bContext *C, ScrArea *area) bAnimListElem *get_active_fcurve_channel(bAnimContext *ac) { ListBase anim_data = {NULL, NULL}; - int filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_ACTIVE); + int filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_ACTIVE | ANIMFILTER_FCURVESONLY); size_t items = ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); /* We take the first F-Curve only, since some other ones may have had 'active' flag set -- cgit v1.2.3