Skip to content

Commit

Permalink
Fixed issue with CPlayer::Clear() if no neutral civilization is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrettin committed Feb 25, 2024
1 parent f3bfdd3 commit 565e043
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/player/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2802,7 +2802,7 @@ void CPlayer::Clear()
{
this->name.clear();
this->set_type(player_type::none);
this->Race = defines::get()->get_neutral_civilization()->ID;
this->Race = defines::get()->get_neutral_civilization() ? defines::get()->get_neutral_civilization()->ID : 0;
this->faction = nullptr;
this->faction_tier = faction_tier::none;
this->government_type = government_type::none;
Expand Down

0 comments on commit 565e043

Please sign in to comment.