summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;