summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/script/api/script_company.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/api/script_company.cpp b/src/script/api/script_company.cpp
index 851ca7888..ee00ef9e5 100644
--- a/src/script/api/script_company.cpp
+++ b/src/script/api/script_company.cpp
@@ -246,7 +246,7 @@
/* static */ TileIndex ScriptCompany::GetCompanyHQ(CompanyID company)
{
company = ResolveCompanyID(company);
- if (company == COMPANY_INVALID) return INVALID_TILE;
+ EnforcePrecondition(INVALID_TILE, company != COMPANY_INVALID);
TileIndex loc = ::Company::Get((CompanyID)company)->location_of_HQ;
return (loc == 0) ? INVALID_TILE : loc;