Skip to content

Commit

Permalink
Fixed crash with the civilization group scripted condition if a unit …
Browse files Browse the repository at this point in the history
…had no civilization
  • Loading branch information
Andrettin committed Feb 1, 2022
1 parent 62a5b31 commit 4cc5825
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/script/condition/civilization_group_condition.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ class civilization_group_condition final : public condition

virtual bool check(const civilization *civilization) const override
{
if (civilization == nullptr) {
return false;
}

return civilization->is_part_of_group(this->group);
}

Expand Down

0 comments on commit 4cc5825

Please sign in to comment.