From 51f5d62fdbc2aa22e890098de4184f13a0b10569 Mon Sep 17 00:00:00 2001 From: frosch Date: Sun, 8 Dec 2013 18:20:14 +0000 Subject: (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(-) (limited to 'src/script') 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; -- cgit v1.2.3-70-g09d2