summaryrefslogtreecommitdiff
path: root/src/script/api/script_company.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/api/script_company.cpp')
-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 ee00ef9e5..851ca7888 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);
- EnforcePrecondition(INVALID_TILE, company != COMPANY_INVALID);
+ if (company == COMPANY_INVALID) return INVALID_TILE;
TileIndex loc = ::Company::Get((CompanyID)company)->location_of_HQ;
return (loc == 0) ? INVALID_TILE : loc;