summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2010-08-18 15:22:40 +0000
committersmatz <smatz@openttd.org>2010-08-18 15:22:40 +0000
commitd28985fe8e701f061344f457d7c8704ad63d1ad8 (patch)
tree683f0f7ceabebb009d87b9198a9a5851c7d110ea
parent38ca44594fa71eda7c53e5c2e320020fb5cba6c8 (diff)
downloadopenttd-d28985fe8e701f061344f457d7c8704ad63d1ad8.tar.xz
(svn r20540) -Fix [FS#4049](r20480): use CmdDeleteTown instead of direct use of operator delete
-rw-r--r--src/town_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
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;