From 565e04328eac44b5001e4a66e031b00c11df7979 Mon Sep 17 00:00:00 2001 From: Andrettin <6322423+Andrettin@users.noreply.github.com> Date: Sun, 25 Feb 2024 19:08:07 +0100 Subject: [PATCH] Fixed issue with CPlayer::Clear() if no neutral civilization is defined --- src/player/player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/player/player.cpp b/src/player/player.cpp index 6f67a0570..9ec581e9c 100644 --- a/src/player/player.cpp +++ b/src/player/player.cpp @@ -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;