From d28985fe8e701f061344f457d7c8704ad63d1ad8 Mon Sep 17 00:00:00 2001 From: smatz Date: Wed, 18 Aug 2010 15:22:40 +0000 Subject: (svn r20540) -Fix [FS#4049](r20480): use CmdDeleteTown instead of direct use of operator delete --- src/town_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/town_cmd.cpp') diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 20b922ccf..f71768e54 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -1764,7 +1764,7 @@ 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->population > 0) return t; - delete t; + DoCommand(t->xy, t->index, 0, DC_EXEC, CMD_DELETE_TOWN); } while (--attempts != 0); return NULL; -- cgit v1.2.3-54-g00ecf