Anim: fix crash when writing empty action groups

It was just a missing 'else' clause around some should-have-been-
conditional code.

Pull Request: https://projects.blender.org/blender/blender/pulls/127241
This commit is contained in:
Sybren A. Stüvel
2024-09-06 12:30:21 +02:00
parent 158b7ae5da
commit fe96a0c3f6

View File

@@ -390,7 +390,9 @@ static void action_blend_write_make_legacy_channel_groups_listbase(
if (fcurves.is_empty()) {
group->channels = {nullptr, nullptr};
}
group->channels = {fcurves.first(), fcurves.last()};
else {
group->channels = {fcurves.first(), fcurves.last()};
}
}
/* Determine the prev/next pointers on the elements. */