Skip to content

SidesList::Prepare_For_MP_Or_Skirmish has minor duplicate code #1029

Open
@xezon

Description

@xezon
SidesList::Prepare_For_MP_Or_Skirmish()
{
...
                if (player_index != -1) {
                    ScriptList *list = Get_Skirmish_Side_Info(player_index)->Get_Script_List();
                    Get_Skirmish_Side_Info(player_index)->Set_Script_List(scripts[j]);
                    scripts[j] = nullptr;

                    if (list != nullptr) {
                        list->Delete_Instance();
                    }

                    scripts[j] = nullptr;
                }
...
}

Sets scripts[j] = nullptr; twice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions