Anim: add type assertion to graph editor function
In `graph_refresh_fcurve_colors()`, add an assertion that the `bAnimListElem` data is actually an F-Curve before casting it to one. No functional changes. Pull Request: https://projects.blender.org/blender/blender/pulls/123987
This commit is contained in:
@@ -671,6 +671,8 @@ static void graph_refresh_fcurve_colors(const bContext *C)
|
||||
|
||||
/* loop over F-Curves, assigning colors */
|
||||
for (ale = static_cast<bAnimListElem *>(anim_data.first), i = 0; ale; ale = ale->next, i++) {
|
||||
BLI_assert_msg(ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE),
|
||||
"Expecting only FCurves when using the ANIMFILTER_FCURVESONLY filter");
|
||||
FCurve *fcu = (FCurve *)ale->data;
|
||||
|
||||
/* set color of curve here */
|
||||
|
||||
Reference in New Issue
Block a user