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]: 80feb13665
This commit is contained in:
Campbell Barton
2023-05-07 13:10:59 +10:00
parent 0eba9e41bf
commit 3ed297633d

View File

@@ -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;