From 1af98ee64cee04f9bba9f05af0690ff42ae41fa7 Mon Sep 17 00:00:00 2001 From: frosch Date: Sun, 8 Dec 2013 18:20:14 +0000 Subject: [PATCH] (svn r26150) -Revert (r26120): EnforcePrecondition alters the last-error status and is only meant for commands. --- src/script/api/script_company.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script/api/script_company.cpp b/src/script/api/script_company.cpp index ee00ef9e59..851ca7888d 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;