This patch provides a fix to T89033.
Under some specific conditions, the list "act->curves" is empty in the "join_groups_action_temp" function. In particular, this happens when a scene contains an action that has not been pushed down, and with no keyframe in it.
This patch solves this issue by simply ensuring that this list is empty before doing the operations with it.