Commit: 051a341cf00ca1518b50b43bb95f95bc24bf2398
Author: Falk David
Date:   Wed Jul 6 17:09:00 2022 +0200
Branches: master
https://developer.blender.org/rB051a341cf00ca1518b50b43bb95f95bc24bf2398

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

===================================================================

M       source/blender/editors/space_graph/graph_utils.c

===================================================================

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

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to