From 3ed297633d5e1233da768a67104c7e2bf3dfc5cb Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 7 May 2023 13:10:59 +1000 Subject: [PATCH] Fix unintended fall-through in ANIM_is_active_channel Regression in [0] would treat many eAnim_ChannelType types data as a bActionGroup. Resolve by including the NULL check in the return. [0]: 80feb136653195551ae0b5bd49567d57e0ed6810 --- source/blender/editors/animation/anim_channels_edit.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index c54689fbd7a..38764873719 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -340,9 +340,7 @@ bool ANIM_is_active_channel(bAnimListElem *ale) case ANIMTYPE_DSVOLUME: case ANIMTYPE_NLAACTION: case ANIMTYPE_DSSIMULATION: { - if (ale->adt) { - return ale->adt->flag & ADT_UI_ACTIVE; - } + return ale->adt && (ale->adt->flag & ADT_UI_ACTIVE); } case ANIMTYPE_GROUP: { bActionGroup *argp = (bActionGroup *)ale->data;