From 87fae6ba578ae648d50df4927a13c5f896cec6d8 Mon Sep 17 00:00:00 2001 From: frosch Date: Wed, 3 Apr 2013 20:24:10 +0000 Subject: [PATCH] (svn r25140) -Fix [FS#5519]: Towns are build as OWNER_TOWN, so they also need to be removed as OWNER_TOWN. --- src/town_cmd.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index abfa181065..7297692129 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -1847,7 +1847,10 @@ static Town *CreateRandomTown(uint attempts, uint32 townnameparts, TownSize size /* if the population is still 0 at the point, then the * placement is so bad it couldn't grow at all */ if (t->cache.population > 0) return t; + + Backup cur_company(_current_company, OWNER_TOWN, FILE_LINE); CommandCost rc = DoCommand(t->xy, t->index, 0, DC_EXEC, CMD_DELETE_TOWN); + cur_company.Restore(); assert(rc.Succeeded()); /* We already know that we can allocate a single town when